diff options
author | Junio C Hamano <junkio@cox.net> | 2006-05-08 23:55:47 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-05-08 23:55:47 -0700 |
commit | 5acd64edec37a7d9783af1a2be99772d466e8f02 (patch) | |
tree | 5cfc7699a2e5ac229ca34098489666f2971b104a /peek-remote.c | |
parent | builtin-grep: documentation (diff) | |
download | tgif-5acd64edec37a7d9783af1a2be99772d466e8f02.tar.xz |
builtin-grep: tighten argument parsing.
I mistyped
git grep next -e '"^@"' '*.c'
and got many hits that contain "next" without complaint.
Obviously what I meant to say was:
git grep -e '"^@"' next -- '*.c'
This tightens the argument parsing rule a bit:
- All "grep" parameters should come first;
- If there is no -e nor -f to specify pattern, the first non
option string is the parameter;
- After that, zero or more revs can follow.
- An optional '--' can be present, and is skipped.
- All the rest are pathspecs. If '--' was not there, they must
be paths that exist in the working tree.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'peek-remote.c')
0 files changed, 0 insertions, 0 deletions