Thread (23 messages) 23 messages, 4 authors, 2018-05-02

Re: git-submodule is missing --dissociate option

From: Casey Fitzpatrick <hidden>
Date: 2018-04-30 11:30:34

It also seems to be missing "--progress", and I imagine others.
Perhaps submodule add/update should be reworked to automatically
accept all the options that clone would?

On Mon, Apr 30, 2018 at 4:29 AM, Casey Fitzpatrick [off-list ref] wrote:
This seems to be a hole in the git feature set. I believe it is fairly
easily worked around, but it would be best to provide the option for
ease of use (and maybe performance?).

git clone has both a --reference feature and a --dissociate option,
with dissociate allowing for a reference to *only* speed up network
transfers rather than have the resulting clone rely upon the reference
always being there (creates an independent repo).
But git submodule only allows for --reference, so there isn't a an
option to make a speedy independent submodule clone in one shot:
https://git-scm.com/docs/git-submodule
I checked the latest online documentation (currently at 2.16.3) and
the documentation in the latest sources (almost 2.18):
https://github.com/git/git/blob/next/Documentation/git-submodule.txt

As far as I am aware this can be worked around with 'git repack -a'
and manual removal of the objects/info/alternates file afterward.
Though I don't know if this results in a less speedy clone than
dissociate would.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help