diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-07-12 22:51:37 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-12 23:23:42 +0200 |
commit | 44b85e89d70da5ee7fc688d4a9c021f6a419b363 (patch) | |
tree | 06d22efd420072ec0657f85ac973e543039238a2 /t/test-lib.sh | |
parent | date.c: Fix off by one error in object-header date parsing (diff) | |
download | git-44b85e89d70da5ee7fc688d4a9c021f6a419b363.tar.xz git-44b85e89d70da5ee7fc688d4a9c021f6a419b363.zip |
t7003: add test to filter a branch with a commit at epoch
Running filter-branch on a history that has a commit with timestamp
at epoch used to fail, but it should have been fixed. Add test to
make sure it won't break again.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rw-r--r-- | t/test-lib.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index d7dfc8b0b1..f3a50d4cb3 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -335,10 +335,19 @@ test_tick () { # Both <file> and <contents> default to <message>. test_commit () { - file=${2:-"$1.t"} + notick= && + if test "z$1" = "z--notick" + then + notick=yes + shift + fi && + file=${2:-"$1.t"} && echo "${3-$1}" > "$file" && git add "$file" && - test_tick && + if test -z "$notick" + then + test_tick + fi && git commit -m "$1" && git tag "$1" } |