summaryrefslogtreecommitdiff
path: root/t/test-lib-functions.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-18 14:36:00 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-18 14:36:00 -0700
commit3387423870e2efbc0b1bf7478a03320e55d2f0bc (patch)
treec5348a045cce07f674fc28e5facf0f5e0d6746da /t/test-lib-functions.sh
parentd71abd99f82e7076775f12deb9326f7d26761591 (diff)
parent5ed75e2a3fb30f93fea7772e481ec6091e9a2c5f (diff)
downloadgit-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.sh21
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"
}