Merge branch 'jc/usage-stdin' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Nov 2015 23:32:38 +0000 (15:32 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Nov 2015 23:32:38 +0000 (15:32 -0800)
The synopsis text and the usage string of subcommands that read
list of things from the standard input are often shown as if they
only take input from a file on a filesystem, which was misleading.

* jc/usage-stdin:
usage: do not insist that standard input must come from a file

1  2 
builtin/stripspace.c
index a8b7a93b43e414b51c76a4853ff3b49394ab1d77,958567a0cd0f3b676f2a46a699b34a67d14f129a..7ff8434f7c3cf71dbd77cbf868d5dc56dd943fdb
@@@ -13,17 -77,9 +13,17 @@@ static void comment_lines(struct strbu
        free(msg);
  }
  
 -static const char *usage_msg = "\n"
 -"  git stripspace [-s | --strip-comments]\n"
 -"  git stripspace [-c | --comment-lines]";
 +static const char * const stripspace_usage[] = {
-       N_("git stripspace [-s | --strip-comments] < input"),
-       N_("git stripspace [-c | --comment-lines] < input"),
++      N_("git stripspace [-s | --strip-comments]"),
++      N_("git stripspace [-c | --comment-lines]"),
 +      NULL
 +};
 +
 +enum stripspace_mode {
 +      STRIP_DEFAULT = 0,
 +      STRIP_COMMENTS,
 +      COMMENT_LINES
 +};
  
  int cmd_stripspace(int argc, const char **argv, const char *prefix)
  {