Re: [PATCH v3 25/30] t/test-lib-functions.sh: support `--date` in `test_commit_bulk()`
- From
Jeff King <peff@peff.net>
- Date
- May 23, 2024, 10:42 UTC
- Message-ID
- <20240523104224.GD1308330@coredump.intra.peff.net>
- In-Reply-To
- <890f6c4b9deb9e3bf02aa180c7ad4ced7f7b6a80.1716318089.git.me@ttaylorr.com>
On Tue, May 21, 2024 at 03:02:59PM -0400, Taylor Blau wrote:
Show 22 quoted lines
> diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
> index 862d80c9748..16fd585e34b 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
> + ;;This gives all of the bulk commits the same date. Which is kind of unrealistic. Conceivably you'd want to be set the starting date at some old spot, and then tick forward from there. It may not matter much in practice, though.
-Peff