Merge branch 'kk/maint-commit-tree'
[gitweb.git] / t / test-lib-functions.sh
index 16397691d951864f760b832ee066a63cd83f64fc..80daaca7806cbe1a6de0ddeba40400c8a811328e 100644 (file)
@@ -143,10 +143,19 @@ test_pause () {
 # Both <file> and <contents> default to <message>.
 
 test_commit () {
-       file=${2:-"$1.t"}
+       notick= &&
+       if test "z$1" = "z--notick"
+       then
+               notick=yes
+               shift
+       fi &&
+       file=${2:-"$1.t"} &&
        echo "${3-$1}" > "$file" &&
        git add "$file" &&
-       test_tick &&
+       if test -z "$notick"
+       then
+               test_tick
+       fi &&
        git commit -m "$1" &&
        git tag "$1"
 }