Re: [PATCH for NEXT] grep: do not unnecessarily query repo for "--"

2017-02-13 Thread Jeff King
On Mon, Feb 13, 2017 at 04:11:59PM -0800, Jonathan Tan wrote: > When running a command of the form > > git grep --no-index pattern -- path > > in the absence of a Git repository, an error message will be printed: > > fatal: BUG: setup_git_env called without repository > > This is because

[PATCH for NEXT] grep: do not unnecessarily query repo for "--"

2017-02-13 Thread Jonathan Tan
When running a command of the form git grep --no-index pattern -- path in the absence of a Git repository, an error message will be printed: fatal: BUG: setup_git_env called without repository This is because "git grep" tries to interpret "--" as a rev. "git grep" has always tried to first