diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-04-01 19:59:23 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-04-01 19:59:24 +0400 |
commit | 900c8ecb5c98c3cae256dcc030476392fdf2bbf2 (patch) | |
tree | 4f5964bf298f9aa94fdc67e0cc880550b33de438 /t/t7502-commit.sh | |
parent | f161fb041eb682af8bae56f31f75bf0065557b95 (diff) | |
parent | 8c613fd5efa1c3bbd48845ed91c533192e699c08 (diff) |
Merge branch 'bc/append-signed-off-by'
Consolidate codepaths that inspect log-message-to-be and decide to
add a new Signed-off-by line in various commands.
* bc/append-signed-off-by:
git-commit: populate the edit buffer with 2 blank lines before s-o-b
Unify appending signoff in format-patch, commit and sequencer
format-patch: update append_signoff prototype
t4014: more tests about appending s-o-b lines
sequencer.c: teach append_signoff to avoid adding a duplicate newline
sequencer.c: teach append_signoff how to detect duplicate s-o-b
sequencer.c: always separate "(cherry picked from" from commit body
sequencer.c: require a conforming footer to be preceded by a blank line
sequencer.c: recognize "(cherry picked from ..." as part of s-o-b footer
t/t3511: add some tests of 'cherry-pick -s' functionality
t/test-lib-functions.sh: allow to specify the tag name to test_commit
commit, cherry-pick -s: remove broken support for multiline rfc2822 fields
sequencer.c: rework search for start of footer to improve clarity
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-x | t/t7502-commit.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index 256137f07a..a4938b1e45 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -424,6 +424,18 @@ test_expect_success 'A single-liner subject with a token plus colon is not a foo ' +test_expect_success 'commit -s places sob on third line after two empty lines' ' + git commit -s --allow-empty --allow-empty-message && + cat <<-EOF >expect && + + + Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> + + EOF + sed -e "/^#/d" -e "s/^:.*//" .git/COMMIT_EDITMSG >actual && + test_cmp expect actual +' + write_script .git/FAKE_EDITOR <<\EOF mv "$1" "$1.orig" ( |