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

Re: [BUG] submodule move badly handled by git-rebase

From
Elijah Newren <newren@gmail.com>
Date
Apr 8, 2020, 16:33 UTC
Message-ID
<CABPp-BHtwTmTT0R7Mu3=YQ=sPDcuvkXqutBjTTBECW4MXQoYWg@mail.gmail.com>
In-Reply-To
<907083995.810443848.1586362984955.JavaMail.root@zimbra39-e7>
On Wed, Apr 8, 2020 at 9:23 AM <ydirson@free.fr> wrote:
Show 18 quoted lines
>
> This may be related to another funky behaviour I just noticed, linked
> to moving submodules around:
>
> - when initially created, the $TOP/orig-name submodule's git-dir gets created in
>   $TOP/.git/modules/orig-name, with $TOP/.git/modules/orig-name/config
>   containing a core.worktree value pointing to $TOP/orig-name
> - when moving the submodule, only the submodule worktree is moved, the git-dir
>   being the same $TOP/.git/modules/orig-name, where the core.worktree still
>   points to the old location
>
> Other unwanted behaviour include "git clean" reporting (and possibly cleaning)
> files from the wrong work tree - it took me head-scratching to understand why
> "git clean -fdx" was ignoring all the cruft I had in this worktree...
>
> Why is it that we need a core.worktree setting at all in there ?  Removing it
> allows "git clean" to do what's expected of it.  OTOH it does not make the
> original problem go away...

Not knowing much about submodules, I'm going to leave submodule issues that don't touch on the merge-machinery or rebase code to someone else to handle. (I'd probably do the same with the merge-machinery and rebase side if I wasn't worried about 2.26.0 regressions in rebase and if I hadn't find a clever way to re-use checkout code to avoid lots of submodule issues while also deleting code in the "ort" merge strategy).

Hopefully someone else on the list who knows more about submodules can chime in on the worktree related bits.

Previous: ydirson@free.fr
Message 6 of 6 in “[BUG] submodule move badly handled by git-rebase”
  1. ydirson@free.frApr 7, 2020
  2. Elijah NewrenApr 7, 2020
  3. ydirson@free.frApr 8, 2020
  4. Elijah NewrenApr 8, 2020
  5. ydirson@free.frApr 8, 2020
  6. Elijah NewrenApr 8, 2020

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.