Re: Bug? diff.submodule=log adds text to commit -v message

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

 



On Mon, Nov 11, 2013 at 10:29:25PM +0100, Jens Lehmann wrote:

> The diff below fixes the problem you describe for me. (But I do not
> consider it a worthwhile fix in its current form because a line
> starting with "Submodule " might appear in a perfectly normal commit
> message, while "diff --git " most probably won't).

Yeah, this fix makes me nervous for that reason. "commit -v" has always
been a little bit flaky in that respect, as it is simply guessing at
the beginning of the diff text it added earlier. In addition to false
negatives, it also has false positives, stripping out people's diffs
that they meant to include in the commit message.

The "right" way to fix this is to change the format to use some more
robust marker, like:

  # Everything below this line is a diff that will be removed.

I do not know offhand if anybody's commit-template generating or parsing
scripts would be broken, but I doubt the fallout would be that big. When
last we discussed this (AFAICT), we did not yet have 0b38227 (commit:
Fix stripping of patch in verbose mode., 2008-11-12), which meant that
it would affect _everybody_. Nowadays it would only affect users of
"-v", which is presumably a much smaller population.

-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]