Re: [RFC/PATCH] log: add log.firstparent option

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

 



On Fri, Jul 24, 2015 at 06:36:34PM -0700, Jeff King wrote:

> > I think in the cycle we merged Couder's trailer stuff we updated the
> > helper functions to locate where the S-o-b should go in an existing
> > message and consolidated (or, at least "talked about consolidating")
> > them into a single helper.  I do not think we wrote any special case
> > for "a line with three-dashes and nothing else on it" when we did
> > so, but that function would be the logical place to do so.
> 
> Yeah, it nicely has the concept of "ignore this footer". But we would
> want it only to kick in when doing emails (where the "---" is
> syntactically significant), I would think. So something like the patch
> below (no commit message because I'm in an airport right now; I'll add
> tests and repost in the next day or two).

This works for "format-patch -s". But I guess that leaves open the
question of "commit --signoff". It should not matter when making a
commit new (after all, you have not yet had a chance to put the "---"
in). But something like "git commit --amend --signoff" might want to
handle it. Of course we have no idea if any "---" we find there is meant
to be an email notes-separator by the user, or if they happened to use
"---" for something else[1] (which is a bad idea if you have an emailed
patches workflow, but many people do not). So it's a bit riskier.

-Peff

[1] While reading the old "git commit --notes" thread recently, Johan
    Herland gave a plausible confusing example:

      What
      ----

      A commit message using markdown-like formatting conventions.

      Why
      ---

      To show that "---" can be part of a commit message. :)
--
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]