diff options
author | Junio C Hamano <junkio@cox.net> | 2005-11-16 21:32:44 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-16 21:32:44 -0800 |
commit | 27dedf0c3b78d1072fb5449149421284f9e5297b (patch) | |
tree | 80da2302f50bb1f396611a4a54a6da52a4592bd0 /git-grep.sh | |
parent | 60d64db4614b1007ca37c228923ec1964d5ad394 (diff) | |
download | git-27dedf0c3b78d1072fb5449149421284f9e5297b.tar.gz |
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-grep.sh')
-rwxr-xr-x | git-grep.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/git-grep.sh b/git-grep.sh index e7a35ebd70..44c16130bd 100755 --- a/git-grep.sh +++ b/git-grep.sh @@ -39,5 +39,9 @@ while : ; do esac shift done +[ "$pattern" ] || { + echo >&2 "usage: 'git grep <pattern> [pathspec*]'" + exit 1 +} git-ls-files -z "${git_flags[@]}" "$@" | xargs -0 grep "${flags[@]}" -e "$pattern" |