From 9f79524a6af0527e380742ee103ca4fbcd440b42 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 18 Apr 2017 11:29:05 +0200 Subject: rebase: pass --[no-]signoff option to git am This makes it easy to sign off a whole patchset before submission. Signed-off-by: Giuseppe Bilotta Signed-off-by: Junio C Hamano --- t/t3428-rebase-signoff.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 t/t3428-rebase-signoff.sh (limited to 't') diff --git a/t/t3428-rebase-signoff.sh b/t/t3428-rebase-signoff.sh new file mode 100755 index 0000000000..2afb564701 --- /dev/null +++ b/t/t3428-rebase-signoff.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +test_description='git rebase --signoff + +This test runs git rebase --signoff and make sure that it works. +' + +. ./test-lib.sh + +# A simple file to commit +cat >file <expected-signed <.*/>/") +EOF + +# Expected commit message after rebase without --signoff (or with --no-signoff) +cat >expected-unsigned < actual && + test_cmp expected-signed actual +' + +test_expect_success 'rebase --no-signoff does not add a sign-off line' ' + git commit --amend -m "first" && + git rbs --no-signoff HEAD^ && + git cat-file commit HEAD | sed -e "1,/^\$/d" > actual && + test_cmp expected-unsigned actual +' + +test_done -- cgit v1.2.3