mirror of
https://github.com/git/git.git
synced 2024-11-18 02:23:52 +01:00
Allow finding things that begin with a dash in 'git grep'
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
f22cc3fcbf
commit
540bf654d0
@ -7,6 +7,11 @@ while :; do
|
||||
flags="$flags $pattern"
|
||||
shift
|
||||
;;
|
||||
-e)
|
||||
pattern="$2"
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-*)
|
||||
echo "unknown flag $pattern" >&2
|
||||
exit 1
|
||||
@ -17,4 +22,4 @@ while :; do
|
||||
esac
|
||||
done
|
||||
shift
|
||||
git-ls-files -z "$@" | xargs -0 grep $flags "$pattern"
|
||||
git-ls-files -z "$@" | xargs -0 grep $flags -e "$pattern"
|
||||
|
Loading…
Reference in New Issue
Block a user