]> git.ipfire.org Git - thirdparty/git.git/commit - git-am.sh
git-am: cope better with an empty Subject: line
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Apr 2008 19:56:50 +0000 (12:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 16 Apr 2008 07:11:04 +0000 (00:11 -0700)
commit2e6e3e829f3759823d70e7af511bc04cd05ad0af
tree71e5777d32934be3aa4f92f2faa580ed284703c7
parent6a28518ae098fad99ca3774ad7ed17bb681b809b
git-am: cope better with an empty Subject: line

When the Subject: line is empty for whatever reason, git-am was fooled by
it and left an empty line at the beginning of the resulting commit log
message.

This moves the logic around so that we do not keep $SUBJECT in a separate
variable.  Instead, $dotest/msg-clean, which used to be the log message
body extracted from the message and then trailing whitespaces cleansed
out, now contains the subject line followed by a blank line at the
beginning for normal messages, and we use the first line from the file as
the summary line throughout the program.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh