Skip to content

Commit

Permalink
Show usage string for 'git stripspace -h'
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
jrn authored and gitster committed Nov 10, 2009
1 parent 1507301 commit 4751f11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builtin-stripspace.c
Expand Up @@ -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");
Expand Down

0 comments on commit 4751f11

Please sign in to comment.