]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/test-lib-functions.sh: support `--notick` in `test_commit_bulk()`
authorTaylor Blau <me@ttaylorr.com>
Thu, 23 May 2024 21:27:08 +0000 (17:27 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 May 2024 18:40:43 +0000 (11:40 -0700)
One of the tests we'll want to add for pseudo-merge bitmaps needs to be
able to generate a large number of commits at a specific date.

Support the `--notick` option (with identical semantics to the
`--notick` option for `test_commit()`) within `test_commit_bulk` as a
prerequisite for that. Callers can then set the various _DATE variables
themselves.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib-functions.sh

index 862d80c9748c7f9d6234c6b47d68ed7854f3de03..427b375b39235d6b4c1dfe8a1e2c1ff032fe3788 100644 (file)
@@ -458,6 +458,7 @@ test_commit_bulk () {
        indir=.
        ref=HEAD
        n=1
+       notick=
        message='commit %s'
        filename='%s.t'
        contents='content %s'
@@ -488,6 +489,9 @@ test_commit_bulk () {
                        filename="${1#--*=}-%s.t"
                        contents="${1#--*=} %s"
                        ;;
+               --notick)
+                       notick=yes
+                       ;;
                -*)
                        BUG "invalid test_commit_bulk option: $1"
                        ;;
@@ -507,7 +511,10 @@ test_commit_bulk () {
 
        while test "$total" -gt 0
        do
-               test_tick &&
+               if test -z "$notick"
+               then
+                       test_tick
+               fi &&
                echo "commit $ref"
                printf 'author %s <%s> %s\n' \
                        "$GIT_AUTHOR_NAME" \