提交 4751f112 编写于 作者: J Jonathan Nieder 提交者: Junio C Hamano

Show usage string for 'git stripspace -h'

Signed-off-by: NJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 15073012
......@@ -73,9 +73,11 @@ int cmd_stripspace(int argc, const char **argv, const char *prefix)
struct strbuf buf = STRBUF_INIT;
int strip_comments = 0;
if (argc > 1 && (!strcmp(argv[1], "-s") ||
if (argc == 2 && (!strcmp(argv[1], "-s") ||
!strcmp(argv[1], "--strip-comments")))
strip_comments = 1;
else if (argc > 1)
usage("git stripspace [-s | --strip-comments] < <stream>");
if (strbuf_read(&buf, 0, 1024) < 0)
die_errno("could not read the input");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册