summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2009-11-09 09:04:57 -0600
committerJunio C Hamano <gitster@pobox.com>2009-11-10 11:06:57 -0800
commit4751f11224600ab25adb0a200fec55a734bc2936 (patch)
tree030d9eae41439a2514022face6bf12f418865e4d
parent1507301204180a17f915b929fc8377e69aef979d (diff)
downloadgit-4751f11224600ab25adb0a200fec55a734bc2936.tar.gz
Show usage string for 'git stripspace -h'
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-stripspace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-stripspace.c b/builtin-stripspace.c
index 1fd2205d53..4d3b93fedb 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] < <stream>");
if (strbuf_read(&buf, 0, 1024) < 0)
die_errno("could not read the input");