git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Denton Liu <liu.denton@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git branch --edit-description a custom file
Date: Thu, 31 Oct 2019 14:06:32 -0400	[thread overview]
Message-ID: <20191031180632.GB2133@sigill.intra.peff.net> (raw)
In-Reply-To: <20191031173507.GA70819@generichostname>

On Thu, Oct 31, 2019 at 10:35:07AM -0700, Denton Liu wrote:

> > You could also have "refs/meta/descriptions" to point to a _single_ blob
> > with all of the descriptions. It could even be in the existing config
> > format. And then you could include it with "[include] blob = ...". That
> > doesn't exist yet, but it would be easy to add (it was something I had
> > always considered when writing the config-include code, but there was
> > never really a good use; and you do have to be careful about pointing to
> > untrusted blobs). That's a convoluted way to get where you want, but I
> > wonder if integrating to the existing config system would have any
> > benefits. I haven't really thought it through.
> 
> I like the ability to include blobs for several reasons:
> 
> Main one is that it handles the versioned branch description problem.
> But it goes further than that, there are a lot of config properties that
> teams might want to share amongst each other. For example, whenever a
> project has a custom smudge filter, usually they include some sort of
> config in the project's README or some sort of setup script. With some
> way to include a shared version of some config, this might be simpler.

There are some past discussions on sharing config, and the security
issues around it. The crux of it is that you probably ought to be
vetting config you get from elsewhere (because it can execute arbitrary
code). At which point being able to refer to a blob isn't all _that_
useful, because these two processes are not all that different:

  git show origin/meta:shared-config
  # ok, looks good; _don't_ just include it by that name, though,
  # because it may be updated by a fetch
  git branch -f meta origin/meta
  git config include.blob meta:shared-config

  git show origin/meta:shared-config
  # ok, looks good
  git cat-file blob origin/meta:shared-config >.git/shared-config
  git config include.path shared-config

There's a specific discussion I'm thinking of which goes into this line
of thinking, but I'm having trouble finding it in the archive. But IIRC,
the conclusion was negative towards directly including the blob because
it doesn't make life better for careful users, and it makes it very easy
to be unsafe for non-careful users.

There's also some (negative) discussion in this much older subthread:

  https://public-inbox.org/git/20120126074208.GD30474@sigill.intra.peff.net/

-Peff

      reply	other threads:[~2019-10-31 18:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 18:39 git branch --edit-description a custom file Denton Liu
2019-10-30 20:28 ` Jeff King
2019-10-30 22:43   ` Denton Liu
2019-10-31  6:18     ` Jeff King
2019-10-31 10:22       ` Johannes Schindelin
2019-10-31 11:00         ` Phillip Wood
2019-10-31 11:30           ` Johannes Schindelin
2019-10-31 13:45             ` Philip Oakley
2019-10-31 15:42               ` Jeff King
2019-11-03 17:56                 ` Philip Oakley
2019-11-04 19:50                   ` Jeff King
2019-11-04  3:21                 ` Junio C Hamano
2019-10-31 18:19         ` Denton Liu
2019-10-31 19:53           ` Phillip Wood
2019-10-31 20:07             ` Jeff King
2019-11-01 12:29               ` Phillip Wood
2019-11-01 16:49                 ` Jeff King
2019-11-01 20:35                   ` Phillip Wood
2019-11-02  4:53               ` Junio C Hamano
2019-10-31 17:35       ` Denton Liu
2019-10-31 18:06         ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191031180632.GB2133@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=liu.denton@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).