grep: prepare to run outside of a work tree
authorJunio C Hamano <gitster@pobox.com>
Fri, 15 Jan 2010 20:50:54 +0000 (12:50 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Jan 2010 20:54:00 +0000 (12:54 -0800)
This moves the call to setup_git_directory() for running "grep" from
the "git" wrapper to the implementation of the "grep" subcommand. A
new variable "use_index" is always true at this stage in the series,
and when it is on, we require that we are in a directory that is under
git control. To make sure we die the same way, we make a second call
into setup_git_directory() when we detect this situation.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found