mirror of
https://github.com/git/git.git
synced 2026-04-11 17:30:08 +02:00
Fix git update-ref --no-deref -d.
Till now --no-deref was just ignored when deleting refs, fix this. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
450d4c0f5a
commit
569740bdd0
@@ -75,6 +75,13 @@ test_expect_success "delete $m (by HEAD)" '
|
||||
'
|
||||
rm -f .git/$m
|
||||
|
||||
cp -f .git/HEAD .git/HEAD.orig
|
||||
test_expect_success "delete symref without dereference" '
|
||||
git update-ref --no-deref -d HEAD &&
|
||||
! test -f .git/HEAD
|
||||
'
|
||||
cp -f .git/HEAD.orig .git/HEAD
|
||||
|
||||
test_expect_success '(not) create HEAD with old sha1' "
|
||||
test_must_fail git update-ref HEAD $A $B
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user