Re: [PATCH master] expand "<branch>" in format.subjectprefix
- From
Jeff King <peff@peff.net>
- Date
- Jan 13, 2010, 20:29 UTC
- Message-ID
- <20100113202930.GC23018@coredump.intra.peff.net>
- In-Reply-To
- <1263402988-925-1-git-send-email-rep.dot.nop@gmail.com>
On Wed, Jan 13, 2010 at 06:16:28PM +0100, Bernhard Reutner-Fischer wrote:
Show 6 quoted lines
> Replace "<branch>" with the current branch name for > [format] > subjectprefix = PATCH <branch> > > A subject-prefix given on the command-line overrides the one given in > the config.
I don't have a big opinion on whether this feature is useful (it wouldn't be to me, but I can see workflows where it could be).
I'm not sure that "current branch" makes sense, though. format-patch is about showing commits, and the current branch is not a property of that commit. It is about where you happen to be currently. So doing:
git checkout X git format-patch Y..Z --subject-prefix "PATCH <branch>"
shows "X" which is not really useful information. Something like git log's "--source" would be more useful; it shows the command-line ref that was used to reach a given commit.
Also, please don't introduce a new substitution syntax. We already have code to do %-expansion. In fact, if you are going to do something like this, maybe it would be best as two patches:
1. Support '%B' as a user-format expansion for the --source branch.
2. Support user-format expansions in the subject prefix.
But I don't know if people would find any of the other substitutions useful in the subject line.
-Peff