summaryrefslogtreecommitdiff
path: root/builtin-tag.c
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-10-26 02:33:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-10-26 21:42:57 (GMT)
commiteca35a25a92a1ad725af2a549fc9158488c4cc43 (patch)
treed598c2304f5c3f6d4bee5aa2cb4ce15fab117bf2 /builtin-tag.c
parent031e6c898f61db1ae0c0be641eac6532c1000d56 (diff)
downloadgit-eca35a25a92a1ad725af2a549fc9158488c4cc43.zip
git-eca35a25a92a1ad725af2a549fc9158488c4cc43.tar.gz
git-eca35a25a92a1ad725af2a549fc9158488c4cc43.tar.bz2
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 'builtin-tag.c')
-rw-r--r--builtin-tag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-tag.c b/builtin-tag.c
index f2853d0..5b141c5 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -125,7 +125,7 @@ static int for_each_tag_name(const char **argv, each_tag_name_fn fn)
static int delete_tag(const char *name, const char *ref,
const unsigned char *sha1)
{
- if (delete_ref(ref, sha1))
+ if (delete_ref(ref, sha1, 0))
return 1;
printf("Deleted tag '%s'\n", name);
return 0;