summaryrefslogtreecommitdiff
path: root/receive-pack.c
diff options
context:
space:
mode:
authorLibravatar Miklos Vajna <vmiklos@frugalware.org>2008-10-26 03:33:56 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2008-10-26 14:42:57 -0700
commiteca35a25a92a1ad725af2a549fc9158488c4cc43 (patch)
treed598c2304f5c3f6d4bee5aa2cb4ce15fab117bf2 /receive-pack.c
parentGIT 1.6.0.3 (diff)
downloadtgif-eca35a25a92a1ad725af2a549fc9158488c4cc43.tar.xz
Fix git branch -m for symrefs.
This had two problems with symrefs. First, it copied the actual sha1 instead of the "pointer", second it failed to remove the old ref after a successful rename. Given that till now delete_ref() always dereferenced symrefs, a new parameters has been introduced to delete_ref() to allow deleting refs without a dereference. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'receive-pack.c')
-rw-r--r--receive-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/receive-pack.c b/receive-pack.c
index d44c19e6b5..f0145bd901 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -222,7 +222,7 @@ static const char *update(struct command *cmd)
warning ("Allowing deletion of corrupt ref.");
old_sha1 = NULL;
}
- if (delete_ref(name, old_sha1)) {
+ if (delete_ref(name, old_sha1, 0)) {
error("failed to delete %s", name);
return "failed to delete";
}