From 3b9dcff5df97ab642de48bc1ce781961686081aa Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 8 Mar 2008 23:40:42 +0100 Subject: builtin remote rm: remove symbolic refs, too "git remote add" can add a symbolic ref "HEAD", and "rm" should delete it, too. Noticed by Teemu Likonen. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- builtin-remote.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'builtin-remote.c') diff --git a/builtin-remote.c b/builtin-remote.c index ca3bf265a9..637b90425e 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -264,6 +264,11 @@ static int add_branch_for_removal(const char *refname, if (!prefixcmp(refname, branches->prefix)) { struct path_list_item *item; + + /* make sure that symrefs are deleted */ + if (flags & REF_ISSYMREF) + return unlink(git_path(refname)); + item = path_list_append(refname, branches->branches); item->util = xmalloc(20); hashcpy(item->util, sha1); -- cgit v1.2.3