git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Feb 5, 2010, 20:29 UTC
Message-ID
<4B6C7FAE.5070104@lsrfire.ath.cx>
In-Reply-To
<7vljf7a901.fsf@alter.siamese.dyndns.org>
Am 05.02.2010 18:27, schrieb Junio C Hamano:
Show 9 quoted lines
> Junio C Hamano <gitster@pobox.com> 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.
Show 8 quoted lines
>  		{ "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é
Previous: Junio C Hamano
Message 5 of 5 in “Remove .git auto detection from setup_git_env()”
  1. Remove .git auto detection from setup_git_env()Nguyễn Thái Ngọc Duy, Feb 5, 2010
  2. Jeff KingFeb 5, 2010
  3. Junio C HamanoFeb 5, 2010
  4. Junio C HamanoFeb 5, 2010
  5. René ScharfeFeb 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.