X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Fcheck-ref-format.c;h=ae3f28115a7a4d65d8bb6f284cd1ececa4f9c2ef;hb=385cc9d8c44eb5be9d57e630129752a72c0a08c8;hp=8707ee935a0ef8c6b6859c0f078c6d51b2269af2;hpb=cfbe22f03f9be1f3bbbd33240dcb127099d4346e;p=git.git diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c index 8707ee935..ae3f28115 100644 --- a/builtin/check-ref-format.c +++ b/builtin/check-ref-format.c @@ -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);