Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'jk/xdiff-drop-xdl-fast-hash'
[gitweb.git]
/
builtin
/
symbolic-ref.c
diff --git
a/builtin/symbolic-ref.c
b/builtin/symbolic-ref.c
index 9c29a64e4331e1e45b4467829ba950006b673818..96eed944683a45c33fa5d4a05414ae56406fafca 100644
(file)
--- a/
builtin/symbolic-ref.c
+++ b/
builtin/symbolic-ref.c
@@
-56,6
+56,8
@@
int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)
ret = check_symref(argv[0], 1, 0, 0);
if (ret)
die("Cannot delete %s, not a symbolic ref", argv[0]);
+ if (!strcmp(argv[0], "HEAD"))
+ die("deleting '%s' is not allowed", argv[0]);
return delete_ref(argv[0], NULL, REF_NODEREF);
}