diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-21 11:03:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-21 11:16:31 -0700 |
commit | 11667316d0dc455131b3898fdd29fe080b5ae4e0 (patch) | |
tree | b17dffde9113351b827b2c3be09c83aa28b83239 /t/lib-t6000.sh | |
parent | b9f80fdaea3a35fa156807e42e52d875bf6ad301 (diff) | |
download | git-11667316d0dc455131b3898fdd29fe080b5ae4e0.tar.gz |
topology tests: teach a helper to set author dates as well
Introduce on_dates helper that is similar to on_committer_date but
also sets the author date, not just the committer date.
At this step, just set the same timestamp to the author date as the
committer date, as no test looks at author date yet.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-t6000.sh')
-rw-r--r-- | t/lib-t6000.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/lib-t6000.sh b/t/lib-t6000.sh index e2c361563b..4ffd90127e 100644 --- a/t/lib-t6000.sh +++ b/t/lib-t6000.sh @@ -82,6 +82,14 @@ on_committer_date () { "$@" } +on_dates () { + assign_fake_date GIT_COMMITTER_DATE "$1" + assign_fake_date GIT_AUTHOR_DATE "$2" + export GIT_COMMITTER_DATE GIT_AUTHOR_DATE + shift 2 + "$@" +} + # Execute a command and suppress any error output. hide_error () { "$@" 2>/dev/null |