From: Jonathan Nieder Date: Mon, 9 Nov 2009 15:04:57 +0000 (-0600) Subject: Show usage string for 'git stripspace -h' X-Git-Tag: v1.6.6-rc0~34^2~7 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4751f11224600ab25adb0a200fec55a734bc2936;p=git.git Show usage string for 'git stripspace -h' Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/builtin-stripspace.c b/builtin-stripspace.c index 1fd2205d5..4d3b93fed 100644 --- a/builtin-stripspace.c +++ b/builtin-stripspace.c @@ -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] < "); if (strbuf_read(&buf, 0, 1024) < 0) die_errno("could not read the input");