summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2010-08-06 03:06:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-11 16:24:26 (GMT)
commitff38d1a9953b3bce7741f8f962c5e067fda2d9ea (patch)
treeaec778e283505a8d9194be1461f3b698eb813e27 /git.c
parent773b69bf7189f5babb26b899b4c35f604cd993c7 (diff)
downloadgit-ff38d1a9953b3bce7741f8f962c5e067fda2d9ea.zip
git-ff38d1a9953b3bce7741f8f962c5e067fda2d9ea.tar.gz
git-ff38d1a9953b3bce7741f8f962c5e067fda2d9ea.tar.bz2
grep: run setup_git_directory_gently() sooner
git grep already runs a repository search unconditionally, even when the --no-index option is supplied; running such a search earlier is not very risky. Just like with shortlog, without this change, the “[pager] grep” configuration is not respected at all. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/git.c b/git.c
index 3d96c2b..5a47bfb 100644
--- a/git.c
+++ b/git.c
@@ -336,7 +336,7 @@ static void handle_internal_command(int argc, const char **argv)
{ "fsck-objects", cmd_fsck, RUN_SETUP },
{ "gc", cmd_gc, RUN_SETUP },
{ "get-tar-commit-id", cmd_get_tar_commit_id },
- { "grep", cmd_grep },
+ { "grep", cmd_grep, RUN_SETUP_GENTLY },
{ "hash-object", cmd_hash_object },
{ "help", cmd_help },
{ "index-pack", cmd_index_pack },