Re: [PATCH master] expand "<branch>" in format.subjectprefix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 13, 2010 at 06:16:28PM +0100, Bernhard Reutner-Fischer wrote:

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]