Dealing with .gitmodules
Antonio Ospite
ao2 at ao2.it
Thu Apr 5 13:51:45 CEST 2018
On Fri, 24 Mar 2017 11:12:38 +0100
martin f krafft <madduck at madduck.net> wrote:
> Hey,
>
> The file .gitmodules (man 5 gitmodules, for use with git-submodule)
> is hardcoded to reside in $GIT_WORK_DIR/.gitmodules. As vcsh
> repositories all share the same work dir, there's a conflict.
>
> Has anyone come up with a smart way to handle this?
>
I am picking up this old discussion, as submodules are indeed the most
"natural" way to deal with extensions or plugins. and this is IMHO the
main pain-point of using detached working trees.
An interesting approach to overcome the limitation of the
hardcoded .gitmodules path is vcsh-modules:
https://github.com/lierdakil/vcsh-modules
It basically "redirects" operations on $GIT_WORK_TREE/.gitmodules to
$GIT_WORK_TREE/.gitmodules.d/$VCSH_REPO_NAME
A more robust solution could be to teach git how to set a custom path
for the gitmodules file.
I have an experimental patch for that I am thinking about proposing it
to git developers. My idea is to have a core.submodulesFile config
setting in git, which vcsh could set when operating on a repo.
Any comments?
If anyone is interested I can CC them (or the list?) when I write to the
git mailing list.
Ciao,
Antonio
--
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it
A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
More information about the vcs-home
mailing list