Skip to content

Commit

Permalink
check-ref-format: update usage string
Browse files Browse the repository at this point in the history
'git check-ref-format' has learned --branch and --print options
since the usage string was last updated.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
jrn authored and gitster committed Nov 10, 2009
1 parent f9bbaa3 commit 6586b1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builtin-check-ref-format.c
Expand Up @@ -7,6 +7,10 @@
#include "builtin.h"
#include "strbuf.h"

static const char builtin_check_ref_format_usage[] =
"git check-ref-format [--print] <refname>\n"
" or: git check-ref-format --branch <branchname-shorthand>";

int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
{
if (argc == 3 && !strcmp(argv[1], "--branch")) {
Expand All @@ -18,6 +22,6 @@ int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
exit(0);
}
if (argc != 2)
usage("git check-ref-format refname");
usage(builtin_check_ref_format_usage);
return !!check_ref_format(argv[1]);
}

0 comments on commit 6586b1f

Please sign in to comment.