diff options
author | Taylor Blau <me@ttaylorr.com> | 2024-04-29 16:44:11 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-30 13:00:27 -0700 |
commit | 6b946a7496eae091d867078c731829c7d8de303c (patch) | |
tree | d0fbd31ec5c29b9d9f9149c59ec9d43e60a5566d | |
parent | 25ad1f83a4958df6a1b561329412d08ccd650ebd (diff) | |
download | git-6b946a7496eae091d867078c731829c7d8de303c.tar.gz |
t/test-lib-functions.sh: support `--date` in `test_commit_bulk()`
Notice: this object is not reachable from any branch.
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 `--date` option (with identical semantics to the `--date`
option for `test_commit()`) within `test_commit_bulk` as a prerequisite
for that.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Notice: this object is not reachable from any branch.
-rw-r--r-- | t/test-lib-functions.sh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 862d80c974..16fd585e34 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -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,12 @@ test_commit_bulk () { filename="${1#--*=}-%s.t" contents="${1#--*=} %s" ;; + --date) + notick=yes + GIT_COMMITTER_DATE="$2" + GIT_AUTHOR_DATE="$2" + shift + ;; -*) BUG "invalid test_commit_bulk option: $1" ;; @@ -507,7 +514,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" \ |