summaryrefslogtreecommitdiff
path: root/t/t4014-format-patch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-10-17 20:48:25 -0700
committerJunio C Hamano <gitster@pobox.com>2012-10-17 22:42:40 -0700
commit212620fe7e74f6bd4a30a5a39d7c7b3f685ef888 (patch)
tree86c779e0aca23b9a33da3f938c1232b9cd0f9dbf /t/t4014-format-patch.sh
parent5a664cf2c76ed83166f5f3ce7385e3cb058e8834 (diff)
downloadgit-212620fe7e74f6bd4a30a5a39d7c7b3f685ef888.tar.gz
format-patch: append --signature after notes
When appending a new signature with "format-patch --signature", if the "--notes" option is also in effect, the location of the new signature (and if the signature should be added in the first place) should be decided using the contents of the original commit log message, before the message from the notes is added. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4014-format-patch.sh')
-rwxr-xr-xt/t4014-format-patch.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 959aa26ef5..bea63814e6 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -616,8 +616,16 @@ test_expect_success 'format-patch --in-reply-to' '
'
test_expect_success 'format-patch --signoff' '
- git format-patch -1 --signoff --stdout |
- grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
+ git format-patch -1 --signoff --stdout >out &&
+ grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>" out
+'
+
+test_expect_success 'format-patch --notes --signoff' '
+ git notes --ref test add -m "test message" HEAD &&
+ git format-patch -1 --signoff --stdout --notes=test >out &&
+ # Notes message must come after S-o-b
+ ! sed "/^Signed-off-by: /q" out | grep "test message" &&
+ sed "1,/^Signed-off-by: /d" out | grep "test message"
'
echo "fatal: --name-only does not make sense" > expect.name-only