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

Re: [PATCH] git-new-workdir: support submodules

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 26, 2015, 05:39 UTC
Message-ID
<xmqqtwzem776.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAGXKyzEYVsz-nRs52pTKo+6JLBiO9daU_C3qev3H43=Vzuygiw@mail.gmail.com>
Craig Silverstein <csilvers@khanacademy.org> writes:
> This patch, in adding submodule support, I expect would be
> similarly useful to people even though it, also, imposes those
> same constraints to the submodule's config files.

I would expect that you would see exactly the same issue with Duy's multiple work tree series. This is not limited to new-workdir.

The right way to look at this is to fix what "git submodule" does; its use of "config" that is shared across branches is the root cause of the trouble. No other part of Git keeps data that needs to be per-branch (or more specifically "tied to the working tree state") in .git/config in such a way that leaving it stale when the working tree state changes breaks the system.

One way to do so might be to move the bits it stores in the config file to somewhere else that is more closely tied to the checkout state and handle that similar to .git/index and .git/HEAD when it comes to multiple work-trees.

Previous: Craig SilversteinNext: Jens Lehmann
Message 7 of 11 in “Re: [PATCH] git-new-workdir: support submodules”
  1. Craig SilversteinDec 23, 2014
  2. Craig SilversteinJan 24, 2015
  3. Junio C HamanoJan 24, 2015
  4. Craig SilversteinJan 25, 2015
  5. Junio C HamanoJan 26, 2015
  6. Craig SilversteinJan 26, 2015
  7. Junio C HamanoJan 26, 2015
  8. Jens LehmannJan 27, 2015
  9. Duy NguyenJan 28, 2015
  10. Duy NguyenJan 28, 2015
  11. Junio C HamanoJan 28, 2015

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.