Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
unpack-trees: do not muck with attributes when we are not checking out
[gitweb.git]
/
builtin-symbolic-ref.c
diff --git
a/builtin-symbolic-ref.c
b/builtin-symbolic-ref.c
index bfc78bb3f6eff2f8e39649b9649ae7263f143ad9..6ae6bcc0e8d02d9af8a81a7d694c0bfd2c6c0514 100644
(file)
--- a/
builtin-symbolic-ref.c
+++ b/
builtin-symbolic-ref.c
@@
-44,6
+44,9
@@
int cmd_symbolic_ref(int argc, const char **argv, const char *prefix)
check_symref(argv[0], quiet);
break;
case 2:
+ if (!strcmp(argv[0], "HEAD") &&
+ prefixcmp(argv[1], "refs/"))
+ die("Refusing to point HEAD outside of refs/");
create_symref(argv[0], argv[1], msg);
break;
default: