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

Re: [BUG?] worktree setup broken in subdirs with git alias

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 7, 2016, 09:26 UTC
Message-ID
<CACsJy8CRJhdb9Gf+SkC+BSHuGa0DPEBZnCDRUa7zkJvrBK72kQ@mail.gmail.com>
In-Reply-To
<568E10A7.5050606@drmicha.warpmail.net>

On Thu, Jan 7, 2016 at 2:15 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 12 quoted lines
> Hi there,
>
> sorry I can't dig deeper now, but the worktree code from next seems to
> get confused now as soon as you cd to a subdir of a worktree (other than
> the main worktree) and use an alias:
>
> git help ss
> `git ss' is aliased to `status -s -b'
> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git status -s -b
> ## exam
> [mjg@skimbleshanks Biomath-WS15 (exam $)]✓ git ss
> fatal: internal error: work tree has already been set

You forgot to mention what version you used. But it's probably related to d95138e (setup: set env $GIT_WORK_TREE when work tree is set, like $GIT_DIR - 2015-06-26). This commit fixed your problem (and was released) but it introduced some other regressions so it's been reverted in 'next'. 'pu' has a re-fix on top of the revert.

Show 12 quoted lines
> Current worktree: /home/mjg/Teaching/LUK
> New worktree: /home/mjg/Teaching/LUK/Biomath-WS15
>
> This is inside the subdir "Biomath-WS15" of the worktree residing in
> ".../LUK".
>
> It wasn't like that last year ;)
>
> Something about setting GIT_DIR and the like in the environment must
> have changed (for aliases), badly interacting with the worktree code.
>
> Michael
-- 
Duy
Previous: Michael J GruberNext: Duy Nguyen
Message 2 of 6 in “[BUG?] worktree setup broken in subdirs with git alias”
  1. Michael J GruberJan 7, 2016
  2. Duy NguyenJan 7, 2016
  3. Duy NguyenJan 7, 2016
  4. Michael J GruberJan 7, 2016
  5. Duy NguyenJan 7, 2016
  6. Michael J GruberJan 7, 2016

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.