Skip to content

Commit 6586b1f

Browse files
jrngitster
authored andcommitted
check-ref-format: update usage string
'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>
1 parent f9bbaa3 commit 6586b1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

builtin-check-ref-format.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
#include "builtin.h"
88
#include "strbuf.h"
99

10+
static const char builtin_check_ref_format_usage[] =
11+
"git check-ref-format [--print] <refname>\n"
12+
" or: git check-ref-format --branch <branchname-shorthand>";
13+
1014
int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
1115
{
1216
if (argc == 3 && !strcmp(argv[1], "--branch")) {
@@ -18,6 +22,6 @@ int cmd_check_ref_format(int argc, const char **argv, const char *prefix)
1822
exit(0);
1923
}
2024
if (argc != 2)
21-
usage("git check-ref-format refname");
25+
usage(builtin_check_ref_format_usage);
2226
return !!check_ref_format(argv[1]);
2327
}

0 commit comments

Comments
 (0)