From 3fe8dce6fc5b1d0bffba8fdb4e075fcd16cf5619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Hasselstr=C3=B6m?= Date: Tue, 3 Jun 2008 01:34:53 +0200 Subject: Make old sha1 optional with git update-ref -d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- t/t1400-update-ref.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 't/t1400-update-ref.sh') diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index b8b7ab4103..f387d46f1a 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 -- cgit v1.2.1