git-subrepo
git-subrepo copied to clipboard
push to skip nested subrepos (as mentioned in Issue #553)
Hello,
I have been using git-subrepo for several personal and professional projects for a couple years. This is a very handy tool :+1: I just came across a situation where I need the feature proposed in this PR (I want to keep several repositories separated and cannot avoid having one inside a subfolder of the other). Because I don't want to break my existing use of git-subrepo (where sometimes I do leverage on the fact that nested subrepo are pushed), I added an option to enable the "skip nested subrepos on push". This option is passed upon clone or init and resides within the .gitrepo
file (it can also be updated with git subrepo config
).
The option is (ill?)named "shallow" at the moment, (-w
or --shallow
flag upon clone or init).
The commit is probably rough on the edges, I just began using it (so far so good), the documentation and test suite should be updated, but it might interest others, and maybe help to get this PR merged at some point.
The code is here: https://github.com/jfrey-xx/git-subrepo/commit/55796941aa30c22f9af04410108b884c869f6a89 (edit: actually I just spotted a bug with existing subrepo, prefer https://github.com/jfrey-xx/git-subrepo/tree/nested )