diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-10-26 03:33:56 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-10-26 14:42:57 -0700 |
commit | eca35a25a92a1ad725af2a549fc9158488c4cc43 (patch) | |
tree | d598c2304f5c3f6d4bee5aa2cb4ce15fab117bf2 /builtin-update-ref.c | |
parent | 031e6c898f61db1ae0c0be641eac6532c1000d56 (diff) | |
download | git-eca35a25a92a1ad725af2a549fc9158488c4cc43.tar.gz |
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-update-ref.c')
-rw-r--r-- | builtin-update-ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-update-ref.c b/builtin-update-ref.c index 56a0b1b39c..d8f3142c06 100644 --- a/builtin-update-ref.c +++ b/builtin-update-ref.c @@ -48,7 +48,7 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) die("%s: not a valid old SHA1", oldval); if (delete) - return delete_ref(refname, oldval ? oldsha1 : NULL); + return delete_ref(refname, oldval ? oldsha1 : NULL, 0); else return update_ref(msg, refname, sha1, oldval ? oldsha1 : NULL, no_deref ? REF_NODEREF : 0, DIE_ON_ERR); |