summaryrefslogtreecommitdiff
path: root/Documentation/git-format-patch.txt
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder@ira.uka.de>2015-06-09 00:28:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-06-09 19:09:44 (GMT)
commitfbfa0973faf47e475854a8919097d5db29acf536 (patch)
tree549e0c519901a5ce9f33bd3d2bd5cf9a37503841 /Documentation/git-format-patch.txt
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-fbfa0973faf47e475854a8919097d5db29acf536.zip
git-fbfa0973faf47e475854a8919097d5db29acf536.tar.gz
git-fbfa0973faf47e475854a8919097d5db29acf536.tar.bz2
commit: cope with scissors lines in commit message
The diff and submodule shortlog appended to the commit message template by 'git commit --verbose' are not stripped when the commit message contains an indented scissors line. When cleaning up a commit message with 'git commit --verbose' or '--cleanup=scissors' the code is careful and triggers only on a pure scissors line, i.e. a line containing nothing but a comment character, a space, and the scissors cut. This is good, because people can embed scissors lines in the commit message while using 'git commit --verbose', and the text they write after their indented scissors line doesn't get deleted. While doing so, however, the cleanup function only looks at the first line matching the scissors pattern and if it doesn't start at the beginning of the line, then the function just returns without performing any cleanup. This is wrong, because a "real" scissors line added by 'git commit --verbose' might follow, and in that case the diff and submodule shortlog get included in the commit message. Fix this by changing the scissors pattern to match only at the beginning of the line, yet be careful to catch scissors on the first line as well. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-format-patch.txt')
0 files changed, 0 insertions, 0 deletions