t/test-lib-functions.sh: support `--notick` in `test_commit_bulk()`

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>

Taylor Blau committed May 23, 2024 at 17:27 UTC 8e41468ef3b0b8435918bae2b5bda2a5d3facdca
1 file changed +8 -1
t/test-lib-functions.sh
+8 -1
@@ -458,6 +458,7 @@ test_commit_bulk () {
458 indir=.
459 ref=HEAD
460 n=1
461 + notick=
462 message='commit %s'
463 filename='%s.t'
464 contents='content %s'
@@ -488,6 +489,9 @@ test_commit_bulk () {
489 filename="${1#--*=}-%s.t"
490 contents="${1#--*=} %s"
491 ;;
492 + --notick)
493 + notick=yes
494 + ;;
495 -*)
496 BUG "invalid test_commit_bulk option: $1"
497 ;;
@@ -507,7 +511,10 @@ test_commit_bulk () {
511
512 while test "$total" -gt 0
513 do
510 - test_tick &&
514 + if test -z "$notick"
515 + then
516 + test_tick
517 + fi &&
518 echo "commit $ref"
519 printf 'author %s <%s> %s\n' \
520 "$GIT_AUTHOR_NAME" \