diff options
author | Jeff King <peff@peff.net> | 2008-11-12 03:25:52 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-12 13:54:31 -0800 |
commit | 0b38227f283e208866d3e2ac85bcd947a71f1b17 (patch) | |
tree | 0603308f6f02634f6ee8a92ff98fb7ae15012a00 /t/t1200-tutorial.sh | |
parent | Fix non-literal format in printf-style calls (diff) | |
download | tgif-0b38227f283e208866d3e2ac85bcd947a71f1b17.tar.xz |
commit: Fix stripping of patch in verbose mode.
When the "-v" option is given, we put diff of what is to be committed into
the commit template, and then strip it back out again after the user has
edited it.
We used to look for the diff by searching for the "diff --git a/"
header. With diff.mnemonicprefix set in the configuration, however, this
pattern does not match. The pattern is loosened to cover this case.
Also, if the user puts their own diff in the message (e.g., as a sample
output), then we will accidentally trigger the pattern, removing part of
their output.
We can avoid doing this stripping altogether if the user didn't use "-v"
in the first place, so we know that any match we find will be a false
positive.
[jc: this fix was split out of a series originally meant for master.]
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1200-tutorial.sh')
0 files changed, 0 insertions, 0 deletions