diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-18 14:36:00 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-18 14:36:00 -0700 |
commit | 3387423870e2efbc0b1bf7478a03320e55d2f0bc (patch) | |
tree | c5348a045cce07f674fc28e5facf0f5e0d6746da /t/test-lib-functions.sh | |
parent | d71abd99f82e7076775f12deb9326f7d26761591 (diff) | |
parent | 5ed75e2a3fb30f93fea7772e481ec6091e9a2c5f (diff) | |
download | git-3387423870e2efbc0b1bf7478a03320e55d2f0bc.tar.gz |
Merge branch 'mv/cherry-pick-s'
After "git cherry-pick -s" gave control back to the user asking
help to resolve conflicts, concluding "git commit" needs to be run
with "-s" if the user wants to sign it off, but the command should
be able to remember that.
* mv/cherry-pick-s:
cherry-pick: don't forget -s on failure
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r-- | t/test-lib-functions.sh | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 9bc57d27e9..8889ba5104 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -144,11 +144,22 @@ test_pause () { test_commit () { notick= && - if test "z$1" = "z--notick" - then - notick=yes + signoff= && + while test $# != 0 + do + case "$1" in + --notick) + notick=yes + ;; + --signoff) + signoff="$1" + ;; + *) + break + ;; + esac shift - fi && + done && file=${2:-"$1.t"} && echo "${3-$1}" > "$file" && git add "$file" && @@ -156,7 +167,7 @@ test_commit () { then test_tick fi && - git commit -m "$1" && + git commit $signoff -m "$1" && git tag "$1" } |