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

Re: Regression: submodule worktrees can clobber core.worktree config

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 11, 2019, 00:07 UTC
Message-ID
<CACsJy8DQTFCO=nKZ9T02RDMZGGwiO1wGK1YERYaXSriiszf74w@mail.gmail.com>
In-Reply-To
<CAGZ79kZ9ibM4eDyK=M6YWEDsjt+JfqJH-Gm56+092VATGuZDaw@mail.gmail.com>
On Fri, Jan 11, 2019 at 3:07 AM Stefan Beller <sbeller@google.com> wrote:
Show 21 quoted lines
>
> > I had a look at https://gitlab.com/pclouds/git/commits/submodules-in-worktrees,
> > and it doesn't seem to be quite all okay.
> >
> > The submodule update step of the repro (that breaks the config on 2.20) emits
> > an error message instead, and leaves the config unchanged:
> >    git -C b2 submodule update
> >    fatal: could not set 'core.worktree' to '../../../../../../b2/a'
> > It looks a bit like it's still trying to do the wrong thing, but errors out
> > during the attempt (repo_config_set_worktree_gently returns false).
>
> There is more than just that. After adding the worktrees,
> (and after the first status call)
>
>     $ cat b2/.git
> gitdir: /u/git/t/trash directory.t7419-submodule-worktrees/b/.git/worktrees/b2
>     $ cat b2/a/.git
> gitdir: /u/git/t/trash
> directory.t7419-submodule-worktrees/b/.git/modules/a/worktrees/a
>
> Are worktrees using absolute path for their gitlinks?

Yes. Moving to relative paths is on my todo list and I probably should get to it after I'm mostly done (*) with submodule support

(*) Sharing submodule repos between worktrees is still something not addressed.
-- 
Duy
Previous: Stefan Beller
Message 8 of 8 in “Regression: submodule worktrees can clobber core.worktree config”
  1. Tomasz ŚniatowskiJan 8, 2019
  2. Duy NguyenJan 8, 2019
  3. Tomasz ŚniatowskiJan 9, 2019
  4. Duy NguyenJan 9, 2019
  5. Stefan BellerJan 9, 2019
  6. Tomasz ŚniatowskiJan 9, 2019
  7. Stefan BellerJan 10, 2019
  8. Duy NguyenJan 11, 2019

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.