diff options
author | freku045@student.liu.se <freku045@student.liu.se> | 2005-12-14 01:30:31 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-12-14 13:53:43 +0300 |
commit | 806f36d4d7caf75b6d3e098cb0353d85d3477c7d (patch) | |
tree | 7925350d3228cd00602abb91fe8712c236ddb2bb /git-grep.sh | |
parent | aa9dc7afd2fc40466b430b35fc5c82d3c820cb26 (diff) |
Trivial usage string clean-up
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-grep.sh')
-rwxr-xr-x | git-grep.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/git-grep.sh b/git-grep.sh index 44c16130bd..2ed8e955d6 100755 --- a/git-grep.sh +++ b/git-grep.sh @@ -3,6 +3,10 @@ # Copyright (c) Linus Torvalds, 2005 # +USAGE='<option>... <pattern> <path>...' +SUBDIRECTORY_OK='Yes' +. git-sh-setup + pattern= flags=() git_flags=() @@ -40,8 +44,7 @@ while : ; do shift done [ "$pattern" ] || { - echo >&2 "usage: 'git grep <pattern> [pathspec*]'" - exit 1 + usage } git-ls-files -z "${git_flags[@]}" "$@" | xargs -0 grep "${flags[@]}" -e "$pattern" |