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
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)
{