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

Re: [PATCH] Solve git-submodule issues with detached work trees

From
Jens Lehmann <jens.lehmann@web.de>
Date
Jul 23, 2012, 23:17 UTC
Message-ID
<500DDB99.80103@web.de>
In-Reply-To
<7vd33mkyhj.fsf@alter.siamese.dyndns.org>
Am 23.07.2012 22:34, schrieb Junio C Hamano:
Show 9 quoted lines
> Jens Lehmann <Jens.Lehmann@web.de> writes:
> 
>> We could get rid of the core.worktree setting by assuming that the
>> directory a gitfile was found in is the root of the repo's work
>> tree (unless configured otherwise).
> 
> Now you lost me.  If you have .git that is not a directory but is a
> gitfile, then you do not need GIT_DIR nor GIT_WORK_TREE in the first
> place, no?

Not inside the submodule, me thinks they only make sense in the superproject (that's why we clean the environment before working inside the submodule). But setting the superproject's GIT_WORK_TREE to something else won't work for an already initialized submodule, as the core.worktree setting will still point to the old work tree which was set when the submodule was initialized. One could expect the submodule's work tree to be $GIT_WORK_TREE/$sm_path when GIT_WORK_TREE is set, but it isn't.

Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 11 in “Solve git-submodule issues with detached work trees”
  1. Solve git-submodule issues with detached work treesDaniel Graña, Jul 22, 2012
  2. Junio C HamanoJul 23, 2012
  3. Jens LehmannJul 23, 2012
  4. Junio C HamanoJul 23, 2012
  5. Jens LehmannJul 23, 2012
  6. Junio C HamanoJul 23, 2012
  7. Jens LehmannJul 23, 2012
  8. Junio C HamanoJul 23, 2012
  9. Daniel GrañaJul 23, 2012
  10. Richard HartmannJul 23, 2012
  11. Richard HartmannJul 23, 2012

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.