]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/test-lib-functions.sh
cherry-pick: don't forget -s on failure
[thirdparty/git.git] / t / test-lib-functions.sh
index 9bc57d27e961720c98f75f95ab3186723e77f88b..8889ba5104cd3f7c783a179d45816d3a82685ef0 100644 (file)
@@ -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"
 }