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

Re: [PATCH] Preserve cwd in setup_git_directory()

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 24, 2008, 12:26 UTC
Message-ID
<alpine.DEB.1.00.0807241324040.8986@racer>
In-Reply-To
<20080724031441.GA26072@laptop>
Hi,
On Thu, 24 Jul 2008, Nguyễn Thái Ngọc Duy wrote:
> When GIT_DIR is not set, cwd is used to determine where .git is. If 
> core.worktree is set, setup_git_directory() needs to jump back to the 
> original cwd in order to calculate worktree, this leads to incorrect 
> .git location later in setup_work_tree().

I do not understand. core.worktree is either absolute, in which case there is no problem. Or it is relative to where the config lives, no?

Besides, this touches a _very_ delicate part of Git. I'd rather not touch it during the -rc cycle.

I remember I was opposed to the whole worktree crap, and judging by the sheer amount of bug reports, next to nobody uses it anyway.

It was implemented in a really ugly manner, too, and my attempt to fix it was still messy. That is why we have _only_ problems with it.

Just thinking of worktree makes me uneasy, Dscho

Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 4 of 9 in “Preserve cwd in setup_git_directory()”
  1. Preserve cwd in setup_git_directory()Nguyễn Thái Ngọc Duy, Jul 24, 2008
  2. Johannes SixtJul 24, 2008
  3. Preserve cwd in setup_git_directory()Nguyen Thai Ngoc Duy, Jul 24, 2008
  4. Johannes SchindelinJul 24, 2008
  5. Nguyen Thai Ngoc DuyJul 24, 2008
  6. Johannes SchindelinJul 24, 2008
  7. Nguyen Thai Ngoc DuyJul 24, 2008
  8. Geoff RussellJul 25, 2008
  9. Johannes SchindelinJul 25, 2008

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.