From 566c7707db4eb18a116659b08d6ff7ad79fcfefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Thu, 18 Oct 2012 14:05:17 +0200 Subject: branch: delete symref branch, not its target If a branch that is to be deleted happens to be a symref to another branch, the current code removes the targeted branch instead of the one it was called for. Change this surprising behaviour and delete the symref branch instead. Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- builtin/branch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin') diff --git a/builtin/branch.c b/builtin/branch.c index 97c736115..5e1e5b4d6 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -239,7 +239,7 @@ static int delete_branches(int argc, const char **argv, int force, int kinds, continue; } - if (delete_ref(name, sha1, 0)) { + if (delete_ref(name, sha1, REF_NODEREF)) { error(remote_branch ? _("Error deleting remote branch '%s'") : _("Error deleting branch '%s'"), -- cgit v1.2.1