Richard Hartmann | 26 Jun 14:28 2012

git submodule vs GIT_WORK_TREE

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,

I think there are two options, here:

* Make git append $submodule to $GIT_WORK_TREE, i.e. operate on
* 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?