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

Re: [PATCH] Reinstate the old behaviour when GIT_DIR is set and GIT_WORK_TREE is unset

From
Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Date
Aug 10, 2007, 11:28 UTC
Message-ID
<20070810112821.GA11026@informatik.uni-freiburg.de>
In-Reply-To
<7vr6mbu8iv.fsf_-_@assigned-by-dhcp.cox.net>
Hello Junio,
Junio C Hamano wrote:
Show 30 quoted lines
> From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Date: Sun, 5 Aug 2007 14:12:53 +0100
> 
> The old behaviour was to unilaterally default to the cwd is the work tree
> when GIT_DIR was set, but GIT_WORK_TREE wasn't, no matter if we are inside
> the GIT_DIR, or if GIT_DIR is actually something like ../../../.git.
> 
> Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> 
>  Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
>  > I think I sent a patch for that, but was negative about it, even if I 
>  > promised not to question your decision.
> 
>  Yes you did.  Here is a refresher with an affected test
>  adjusted.
> 
>  We already have a few changes that worked around the semantics
>  change by either setting GIT_WORK_TREE or cd'ing up, but I
>  think they should not need to be reverted.
> 
>  It makes more sense to keep the old semantics -- people who use
>  unusual GIT_DIR setting should know what they are doing, and
>  the new GIT_WORK_TREE feature (and core.worktree) would give
>  them better control.  We just should not break existing users
>  that set GIT_DIR and nothing else.  Which means I need another
>  rewrite on the Release Notes, and probably yet another rc
>  cycle.
I don't know if you planed to make 
	git checkout-index --prefix=/tmp/tra -a

work (again) in a bare repo. Probably not, so it's no surprise that it still doesn't work.

Best regards Uwe

-- 
Uwe Kleine-König

cat /*dev/null; echo 'Hello World!';
cat > /dev/null <<*/ 
() { } int main() { printf("Hello World!\n");}
/* */
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 12 in “checkout-index needs a working tree”
  1. checkout-index needs a working treeJohannes Schindelin, Aug 4, 2007
  2. Junio C HamanoAug 4, 2007
  3. Johannes SchindelinAug 5, 2007
  4. Uwe Kleine-KönigAug 9, 2007
  5. Johannes SchindelinAug 10, 2007
  6. Junio C HamanoAug 10, 2007
  7. Johannes SchindelinAug 10, 2007
  8. Reinstate the old behaviour when GIT_DIR is set and GIT_WORK_TREE is unsetJunio C Hamano, Aug 10, 2007
  9. Uwe Kleine-KönigAug 10, 2007
  10. Junio C HamanoAug 10, 2007
  11. Junio C HamanoAug 11, 2007
  12. checkout-index doc: use --work-dir in the export exampleUwe Kleine-König, Aug 11, 2007

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.