grep: fix worktree setup
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 28 Aug 2008 13:04:30 +0000 (20:04 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 29 Aug 2008 05:46:16 +0000 (22:46 -0700)
commit6577f542b3ab64594c7d7a7db752e96be7234fb0
tree2632bcaa41c70b3e1192739c95e6433d35ac9f33
parent4f38f6b5bafb1f7f85c7b54d0bb0a0e977cd947c
grep: fix worktree setup

Unless used with --cached or grepping on a tree, "git grep" will
search on working directory, so set up worktree properly

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-grep.c
t/t1501-worktree.sh