Code

Merge branch 'ab/require-perl-5.8'
[git.git] / builtin / check-ref-format.c
index 8707ee935a0ef8c6b6859c0f078c6d51b2269af2..ae3f28115a7a4d65d8bb6f284cd1ececa4f9c2ef 100644 (file)
@@ -36,7 +36,9 @@ static void collapse_slashes(char *dst, const char *src)
 static int check_ref_format_branch(const char *arg)
 {
        struct strbuf sb = STRBUF_INIT;
+       int nongit;
 
+       setup_git_directory_gently(&nongit);
        if (strbuf_check_branch_ref(&sb, arg))
                die("'%s' is not a valid branch name", arg);
        printf("%s\n", sb.buf + 11);