fix usage string for git grep
Without this patch, git-grep gives confusing usage information: $ git grep --confused usage: git grep <option>* <rev>* [-e] <pattern> [<path>...] $ git grep HEAD pattern fatal: ambiguous argument 'pattern': unknown revision or path no t in the working tree. Use '--' to separate paths from revisions So put <pattern> before the <rev>s, in accordance with actual correct usage. While we're changing the usage string, we might as well include the "--" separating revisions and paths, too. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder committed
Jul 20, 2008 at 14:13 UTC
2d9c572578c72bd6691e80a9feed7d631baf007f
1 file changed
+1
-1
builtin-grep.c
+1
-1
@@ -498,7 +498,7 @@ static int grep_object(struct grep_opt *opt, const char **paths,
498
}
499
500
static const char builtin_grep_usage[] =
501
-"git-grep <option>* <rev>* [-e] <pattern> [<path>...]";
501
+"git-grep <option>* [-e] <pattern> <rev>* [[--] <path>...]";
502
503
static const char emsg_invalid_context_len[] =
504
"%s: invalid context length argument";