git submodule vs GIT_WORK_TREE

From: Richard Hartmann <hidden>
Date: 2016-06-15 22:54:10

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help