X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft1400-update-ref.sh;h=b31e4b1ac66e56d67ba48ab213c4ef9c32f05ea8;hb=0513f241cc2d757371dc7ba6b065366de044862e;hp=f387d46f1a17ac9f9d3319c4da7e30a6c6326c67;hpb=1947bdbc31e8e1419bdfe90d2357c68919189c30;p=git.git diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index f387d46f1..b31e4b1ac 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -76,7 +76,7 @@ test_expect_success "delete $m (by HEAD)" ' rm -f .git/$m test_expect_success '(not) create HEAD with old sha1' " - ! git update-ref HEAD $A $B + test_must_fail git update-ref HEAD $A $B " test_expect_success "(not) prior created .git/$m" " ! test -f .git/$m @@ -87,7 +87,7 @@ test_expect_success \ "create HEAD" \ "git update-ref HEAD $A" test_expect_success '(not) change HEAD with wrong SHA1' " - ! git update-ref HEAD $B $Z + test_must_fail git update-ref HEAD $B $Z " test_expect_success "(not) changed .git/$m" " ! test $B"' = $(cat .git/'"$m"') @@ -155,7 +155,8 @@ rm -f .git/$m .git/logs/$m expect git update-ref $m $D cat >.git/logs/$m < 1117150320 -0500 +0000000000000000000000000000000000000000 $C $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500 +$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150350 -0500 $A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500 $F $Z $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150680 -0500 $Z $E $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150980 -0500 @@ -186,6 +187,12 @@ test_expect_success \ 'Query "master@{May 26 2005 23:32:00}" (exactly history start)' \ 'rm -f o e git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e && + test '"$C"' = $(cat o) && + test "" = "$(cat e)"' +test_expect_success \ + 'Query "master@{May 26 2005 23:32:30}" (first non-creation change)' \ + 'rm -f o e + git rev-parse --verify "master@{May 26 2005 23:32:30}" >o 2>e && test '"$A"' = $(cat o) && test "" = "$(cat e)"' test_expect_success \