index 8707ee935a0ef8c6b6859c0f078c6d51b2269af2..ae3f28115a7a4d65d8bb6f284cd1ececa4f9c2ef 100644 (file)
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);