Skip to content

Commit 8e41468

Browse files
ttaylorrgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 71eca9a commit 8e41468

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/test-lib-functions.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ test_commit_bulk () {
458458
indir=.
459459
ref=HEAD
460460
n=1
461+
notick=
461462
message='commit %s'
462463
filename='%s.t'
463464
contents='content %s'
@@ -488,6 +489,9 @@ test_commit_bulk () {
488489
filename="${1#--*=}-%s.t"
489490
contents="${1#--*=} %s"
490491
;;
492+
--notick)
493+
notick=yes
494+
;;
491495
-*)
492496
BUG "invalid test_commit_bulk option: $1"
493497
;;
@@ -507,7 +511,10 @@ test_commit_bulk () {
507511

508512
while test "$total" -gt 0
509513
do
510-
test_tick &&
514+
if test -z "$notick"
515+
then
516+
test_tick
517+
fi &&
511518
echo "commit $ref"
512519
printf 'author %s <%s> %s\n' \
513520
"$GIT_AUTHOR_NAME" \

0 commit comments

Comments
 (0)