aboutsummaryrefslogtreecommitdiff
path: root/builtin-grep.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@uchicago.edu>2008-07-20 14:13:08 -0500
committerJunio C Hamano <gitster@pobox.com>2008-07-20 13:01:26 -0700
commit2d9c572578c72bd6691e80a9feed7d631baf007f (patch)
tree0f1ce164493ae27d99f5532a17b93da9c4a3233f /builtin-grep.c
parent3f1b7b607a81cf56254fcc4ed417cc4344cde2a5 (diff)
downloadgit-2d9c572578c72bd6691e80a9feed7d631baf007f.tar.gz
git-2d9c572578c72bd6691e80a9feed7d631baf007f.tar.xz
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>
Diffstat (limited to 'builtin-grep.c')
-rw-r--r--builtin-grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-grep.c b/builtin-grep.c
index 647535061..d8b06ce81 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -498,7 +498,7 @@ static int grep_object(struct grep_opt *opt, const char **paths,
}
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";