summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Hasselström <kha@treskal.com>2008-06-02 23:34:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-06-03 05:52:39 (GMT)
commit3fe8dce6fc5b1d0bffba8fdb4e075fcd16cf5619 (patch)
tree0df179167dd685e7d96aa46d28cdffd312e2ea6c /t
parent973a70ea4d9fc98e9ed20c261c5f6c8f1c1df2b0 (diff)
downloadgit-3fe8dce6fc5b1d0bffba8fdb4e075fcd16cf5619.zip
git-3fe8dce6fc5b1d0bffba8fdb4e075fcd16cf5619.tar.gz
git-3fe8dce6fc5b1d0bffba8fdb4e075fcd16cf5619.tar.bz2
Make old sha1 optional with git update-ref -d
Giving the old sha1 is already optional when changing a ref, and it's quite handy when running update-ref manually. So make it optional for deleting a ref too. Signed-off-by: Karl Hasselström <kha@treskal.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t1400-update-ref.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index b8b7ab4..f387d46 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -42,6 +42,14 @@ test_expect_success "delete $m" '
'
rm -f .git/$m
+test_expect_success "delete $m without oldvalue verification" "
+ git update-ref $m $A &&
+ test $A = \$(cat .git/$m) &&
+ git update-ref -d $m &&
+ ! test -f .git/$m
+"
+rm -f .git/$m
+
test_expect_success \
"fail to create $n" \
"touch .git/$n_dir