Johannes Schindelin [off-list ref] writes:
quoted hunk
"git remote add" can add a symbolic ref "HEAD", and "rm" should delete
it, too.
Noticed by Teemu Likonen.
Signed-off-by: Johannes Schindelin <redacted>
---
builtin-remote.c | 5 +++++
t/t5505-remote.sh | 1 +
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/builtin-remote.c b/builtin-remote.c
index aa90cc9..f7653b6 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -267,6 +267,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));
+
Heh, doing this in C is much easier and simpler ;-)