diff options
Diffstat (limited to 'builtin/check-ref-format.c')
| -rw-r--r-- | builtin/check-ref-format.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c index 5eb6bdc3f6..cef1ffe3ce 100644 --- a/builtin/check-ref-format.c +++ b/builtin/check-ref-format.c @@ -1,7 +1,6 @@ /* * GIT - The information manager from hell */ - #include "builtin.h" #include "refs.h" #include "setup.h" @@ -43,7 +42,7 @@ static int check_ref_format_branch(const char *arg) int nongit; setup_git_directory_gently(&nongit); - if (strbuf_check_branch_ref(&sb, arg) || + if (check_branch_ref(&sb, arg) || !skip_prefix(sb.buf, "refs/heads/", &name)) die("'%s' is not a valid branch name", arg); printf("%s\n", name); @@ -51,7 +50,10 @@ static int check_ref_format_branch(const char *arg) return 0; } -int cmd_check_ref_format(int argc, const char **argv, const char *prefix) +int cmd_check_ref_format(int argc, + const char **argv, + const char *prefix, + struct repository *repo UNUSED) { int i; int normalize = 0; |
