Revert "We do not like "HEAD" as a new branch name"
authorJunio C Hamano <junkio@cox.net>
Sat, 17 Dec 2005 07:48:22 +0000 (23:48 -0800)
committerJunio C Hamano <junkio@cox.net>
Sun, 18 Dec 2005 07:10:56 +0000 (23:10 -0800)
This reverts ee34518d629331dadd58b1a75294369d679eda8b commit.

refs.c

diff --git a/refs.c b/refs.c
index 0d63c1f..c33729c 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -347,11 +347,6 @@ int check_ref_format(const char *ref)
                if (!ch) {
                        if (level < 2)
                                return -1; /* at least of form "heads/blah" */
-
-                       /* do not allow ref name to end in "HEAD" */
-                       if (cp - ref > 4 && !strcmp(cp - 4, "HEAD"))
-                               return -1;
-
                        return 0;
                }
        }