summaryrefslogtreecommitdiff
path: root/builtin-check-ref-format.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2009-11-09 09:04:47 -0600
committerJunio C Hamano <gitster@pobox.com>2009-11-10 10:47:33 -0800
commit6586b1f3465a93e908664ea24fa2f5ff47a587e3 (patch)
tree3970015672479b7c7e97b85c6fd8f2bca72281f6 /builtin-check-ref-format.c
parentf9bbaa384efd4c5c56b9a13d08680f6fc09324ca (diff)
downloadgit-6586b1f3465a93e908664ea24fa2f5ff47a587e3.tar.gz
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>
Diffstat (limited to 'builtin-check-ref-format.c')
-rw-r--r--builtin-check-ref-format.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin-check-ref-format.c b/builtin-check-ref-format.c
index f9381e07ea..96382e3447 100644
--- a/builtin-check-ref-format.c
+++ b/builtin-check-ref-format.c
@@ -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")) {
@@ -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]);
}