summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f1b7b6)
raw | patch | inline | side by side (parent: 3f1b7b6)
author | Jonathan Nieder <jrnieder@uchicago.edu> | |
Sun, 20 Jul 2008 19:13:08 +0000 (14:13 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 20 Jul 2008 20:01:26 +0000 (13:01 -0700) |
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>
$ 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>
builtin-grep.c | patch | blob | history |
diff --git a/builtin-grep.c b/builtin-grep.c
index 647535061c350b68f1583fc12b049a37eb17481c..d8b06ce810d334654ada4b7fa3b79c19a4787565 100644 (file)
--- a/builtin-grep.c
+++ b/builtin-grep.c
}
static const char builtin_grep_usage[] =
-"git-grep <option>* <rev>* [-e] <pattern> [<path>...]";
+"git-grep <option>* [-e] <pattern> <rev>* [[--] <path>...]";
static const char emsg_invalid_context_len[] =
"%s: invalid context length argument";