提交 6586b1f3 编写于 作者: J Jonathan Nieder 提交者: Junio C Hamano

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: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f9bbaa38
......@@ -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]);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册