Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-10-26 05:33:56 +0300
committerJunio C Hamano <gitster@pobox.com>2008-10-27 00:42:57 +0300
commiteca35a25a92a1ad725af2a549fc9158488c4cc43 (patch)
treed598c2304f5c3f6d4bee5aa2cb4ce15fab117bf2 /builtin-reset.c
parent031e6c898f61db1ae0c0be641eac6532c1000d56 (diff)
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-reset.c')
-rw-r--r--builtin-reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-reset.c b/builtin-reset.c
index 16e6bb20f1..9514b77f8c 100644
--- a/builtin-reset.c
+++ b/builtin-reset.c
@@ -279,7 +279,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
update_ref(msg, "ORIG_HEAD", orig, old_orig, 0, MSG_ON_ERR);
}
else if (old_orig)
- delete_ref("ORIG_HEAD", old_orig);
+ delete_ref("ORIG_HEAD", old_orig, 0);
prepend_reflog_action("updating HEAD", msg, sizeof(msg));
update_ref_status = update_ref(msg, "HEAD", sha1, orig, 0, MSG_ON_ERR);