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

git submodule vs GIT_WORK_TREE

From
Richard Hartmann <richih.mailinglist@gmail.com>
Date
Jun 26, 2012, 12:28 UTC
Message-ID
<CAD77+gTVLsEOgWo+WDafzNOYOwSZQ2KkgBuibBXemVmGu_Fzgw@mail.gmail.com>
Hi all,

vcsh [1] has had an open bug[2] filed against it for some time now. I came to the conclusion that I can not properly work around this within the scope of vcsh so I am hoping for help on this list.

As you are most likely aware, `git submodule` allows you to access a separate git repository in a sub-directory, e.g. $submodule, while $GIT_WORK_TREE forces git to operate in a specific directory. Combine the two and the result is less than ideal. git is forced to operate in $GIT_WORK_TREE while it should operate on $GIT_WORK_TREE/$submodule, instead.

I think there are two options, here:
* Make git append $submodule to $GIT_WORK_TREE, i.e. operate on
$GIT_WORK_TREE/$submodule
* Introduce $GIT_WORK_TREE_RELATIVE which allows submodule and
potentially other commands to append to it
Did I miss another option? Would anyone be willing to fix/implement this?

Thanks, Richard

[1] https://github.com/RichiH/vcsh [2] https://github.com/RichiH/vcsh/issues/27

Next: Junio C Hamano
Message 1 of 13 in “git submodule vs GIT_WORK_TREE”
  1. Richard HartmannJun 26, 2012
  2. Junio C HamanoJun 26, 2012
  3. Jens LehmannJun 26, 2012
  4. Junio C HamanoJun 26, 2012
  5. Jens LehmannJun 26, 2012
  6. Junio C HamanoJun 26, 2012
  7. Richard HartmannJun 29, 2012
  8. Junio C HamanoJun 29, 2012
  9. Junio C HamanoJun 29, 2012
  10. Junio C HamanoJun 29, 2012
  11. Richard HartmannJul 1, 2012
  12. Junio C HamanoJul 2, 2012
  13. Richard HartmannJun 29, 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.