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

Re: Branch switching with submodules where the submodule replaces a folder aborts unexpectedly

From
Stefan Beller <sbeller@google.com>
Date
Oct 9, 2017, 21:59 UTC
Message-ID
<CAGZ79kYTY6U0eNwvU0PcDyt_QXGyYGm5VkDvWLtuQgQG6BbtFA@mail.gmail.com>
In-Reply-To
<788230417.115707.1507584541605@ox.hosteurope.de>

On Mon, Oct 9, 2017 at 2:29 PM, Thomas Braun <thomas.braun@virtuell-zuhause.de> wrote:

Show 5 quoted lines
> Hi,
>
> I'm currently in the progress of pulling some subprojects in a git repository of mine into their own repositories and adding these subprojects back as submodules.
>
> While doing this I enountered a potential bug as checkout complains on branch switching that a file already exists.
(And I presume you know about --recurse-submodules as a flag for git-checkout)
This is consistent with our tests, unfortunately.

git/t$ ./t2013-checkout-submodule.sh ... not ok 15 - git checkout --recurse-submodules: replace submodule with a directory # TODO known breakage ...

> If I'm misusing git here I'm glad for any advice.
You are not.

Apart from this bug report, would you think that such filtering of trees into submodules (and back again) might be an interesting feature of Git or are these cases rare and special?

Thanks, Stefan

Previous: Thomas BraunNext: Thomas Braun
Message 2 of 3 in “Branch switching with submodules where the submodule replaces a folder aborts unexpectedly”
  1. Thomas BraunOct 9, 2017
  2. Stefan BellerOct 9, 2017
  3. Thomas BraunOct 12, 2017

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.