Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
check-ref-format: update usage string
author
Jonathan Nieder
<jrnieder@gmail.com>
Mon, 9 Nov 2009 15:04:47 +0000
(09:04 -0600)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 10 Nov 2009 18:47:33 +0000
(10:47 -0800)
'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>
builtin-check-ref-format.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f9bbaa3
)
diff --git
a/builtin-check-ref-format.c
b/builtin-check-ref-format.c
index f9381e07eaeda673e91ef6250eca4027c5ba0278..96382e34477263275c8d1f3628e3db4755042a06 100644
(file)
--- a/
builtin-check-ref-format.c
+++ b/
builtin-check-ref-format.c
@@
-7,6
+7,10
@@
#include "builtin.h"
#include "strbuf.h"
#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")) {
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)
exit(0);
}
if (argc != 2)
- usage(
"git check-ref-format refname"
);
+ usage(
builtin_check_ref_format_usage
);
return !!check_ref_format(argv[1]);
}
return !!check_ref_format(argv[1]);
}