[ https://issues.apache.org/jira/browse/CB-11144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16511417#comment-16511417 ]
Raphael edited comment on CB-11144 at 6/13/18 4:47 PM: ------------------------------------------------------- As of now, we do not use git in cordova-fetch but rather pass any specs directly to npm untouched. Moving on, we hope to do less dependency management ourselves, so I do not see any optimization happening from our part here. npm uses pacote to fetch its packages. As you can see from looking at [the code for fetching a git repo|https://github.com/zkat/pacote/blob/ccc6e9094c2e872f09cc12ae966a0cbc1a570eed/lib/fetchers/git.js#L165], it already does shallow cloning, but only for git hoster known to support it. A sensible decision IMHO, although a way to add hosts to the white list would be nice for private servers. was (Author: raphinesse): As of now, we do not use git in cordova-fetch but rather pass any specs directly to npm untouched. Moving on, we hope to do less dependency management ourselves, so I do not see any optimization happening from our part here. npm uses pacote to fetch its packages. As you can see from looking at [the code for fetching a git repo|https://github.com/zkat/pacote/blob/ccc6e9094c2e872f09cc12ae966a0cbc1a570eed/lib/fetchers/git.js#L165], this is already done, but only for git hoster known to support it. > Make Git fetches faster for plugin, platforms, and templates by using --depth > 1 > ------------------------------------------------------------------------------- > > Key: CB-11144 > URL: https://issues.apache.org/jira/browse/CB-11144 > Project: Apache Cordova > Issue Type: Improvement > Components: cordova-fetch > Reporter: Carlos Santana > Assignee: Carlos Santana > Priority: Major > Labels: backlog > > Some users are complaining that some plugin git repos are too big, and the > plugin is not available thru npm > So people installing the plugin it can take up to 20 minutes to install a > plugin because Cordova CLI it's doing a full git clone of the repo. > I was wondering if the flag --depth 1 would make it faster by fetching just > the last copy of the repo on the specified git hash, hash can be branch, or > tag, or commit hash > Going to ask to the mailing list to see of using --depth 1 is a good and safe > change? -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org