提交 c9fc748f 编写于 作者: J Junio C Hamano

git-grep: fix 'git grep -e $pattern' handling

People typically say 'grep -e $pattern' because $pattern has a leading
dash which would be mistaken as a grep flag.  Make sure we pass -e in
front of $pattern when we invoke grep.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 dc56bc03
......@@ -40,4 +40,4 @@ while : ; do
shift
done
git-ls-files -z "${git_flags[@]}" "$@" |
xargs -0 grep "${flags[@]}" "$pattern"
xargs -0 grep "${flags[@]}" -e "$pattern"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册