Subject: Re: [PATCH] Remove .git auto detection from setup_git_env()

From: René Scharfe <[email-masked]>
Date: Fri, 05 Feb 2010 21:29:34 +0100

Am 05.02.2010 18:27, schrieb Junio C Hamano:
> Junio C Hamano <[email-masked]> writes:
> 
>> This topic started from "We broke 'git grep' in .git directory" and I
>> think it is the sanest to revert 3081623 (grep --no-index: allow use of
>> "git grep" outside a git repository, 2010-01-15) which nobody has used so
>> far in any released version of git, until we sort this out at least.
> 
> Sorry; spoke too fast.  We'd also need to revert the one to git.c (7e62265
> (grep: prepare to run outside of a work tree, 2010-01-15) as well.

>  		{ "fsck-objects", cmd_fsck, RUN_SETUP },
>  		{ "gc", cmd_gc, RUN_SETUP },
>  		{ "get-tar-commit-id", cmd_get_tar_commit_id },
> -		{ "grep", cmd_grep, USE_PAGER },
> +		{ "grep", cmd_grep, RUN_SETUP | USE_PAGER },
>  		{ "hash-object", cmd_hash_object },
>  		{ "help", cmd_help },
>  		{ "index-pack", cmd_index_pack },

There is one other command with only the USE_PAGER flag turned on, which
also seems to have been broken by the change to remove the RUN_SETUP
flag: shortlog.  But that was done in March 2008 (abe549e1, "shortlog:
do not require to run from inside a git repository"), so it's no regression.

René