Don't shallow clone specs repos #5016

Closed
segiddins opened this Issue Mar 9, 2016 · 8 comments

Comments

Projects
None yet
5 participants
@segiddins
Member

segiddins commented Mar 9, 2016

  • Don't shallow clone specs repositories
  • Try and convert shallow clones to deep clones
    • --unshallow or rm && clone? (@vmg / @mhagger I'd appreciate feedback on this one)

@segiddins segiddins self-assigned this Mar 9, 2016

@segiddins segiddins added this to the 1.0.0 milestone Mar 9, 2016

@Coeur

This comment has been minimized.

Show comment
Hide comment
@Coeur

Coeur Mar 10, 2016

Contributor

Could that be linked to this kind of answers on Stackoverflow: http://stackoverflow.com/a/33699136/1033581
People are encouraging --depth=1 when in China. Otherwise cloning takes hours.

Contributor

Coeur commented Mar 10, 2016

Could that be linked to this kind of answers on Stackoverflow: http://stackoverflow.com/a/33699136/1033581
People are encouraging --depth=1 when in China. Otherwise cloning takes hours.

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Mar 10, 2016

Member

Shallow clones make up a large portion of the issue with serving the master specs repo, so we cannot officially support shallow cloning the master specs repo any more -- it would be incredibly unfair to GitHub.

Member

segiddins commented Mar 10, 2016

Shallow clones make up a large portion of the issue with serving the master specs repo, so we cannot officially support shallow cloning the master specs repo any more -- it would be incredibly unfair to GitHub.

@segiddins segiddins referenced this issue Mar 10, 2016

Merged

Disallow shallow clones of specs repos #5018

4 of 4 tasks complete
@vmg

This comment has been minimized.

Show comment
Hide comment
@vmg

vmg Mar 10, 2016

People are encouraging --depth=1 when in China. Otherwise cloning takes hours.

Unfortunately, and because of a bug in Git itself that we're investigating upstream, a --depth=1 clone in a repository like CocoaPods will end up downloading several times more data over time (as you keep fetching on top of the shallow clone) than a full clone would take. So unshallowing the repository is better on the long run for everybody, even those with limited internet connections.

--unshallow or rm && clone?

Both should have the same effect. I would lean towards rm because that's going to work 100% of the time. 😄 (not that I've seen --unshallow fail in practice, but whatevs)

vmg commented Mar 10, 2016

People are encouraging --depth=1 when in China. Otherwise cloning takes hours.

Unfortunately, and because of a bug in Git itself that we're investigating upstream, a --depth=1 clone in a repository like CocoaPods will end up downloading several times more data over time (as you keep fetching on top of the shallow clone) than a full clone would take. So unshallowing the repository is better on the long run for everybody, even those with limited internet connections.

--unshallow or rm && clone?

Both should have the same effect. I would lean towards rm because that's going to work 100% of the time. 😄 (not that I've seen --unshallow fail in practice, but whatevs)

@segiddins segiddins closed this in #5018 Mar 10, 2016

@orta orta referenced this issue Mar 11, 2016

Closed

Feedback from GitHub meta-issue #5005

4 of 4 tasks complete
@AntiMoron

This comment has been minimized.

Show comment
Hide comment
@AntiMoron

AntiMoron Feb 25, 2017

Hey! I'm angry on the sight of this issue.
As @Coeur said, users like me in China need to clone Specs with --depth=1. But you say it would be unfair to all the GitHub users. I totally disagree.
You can make it --unshallow by default but you shouldn't force people git clone --unshallow.
Why there's no such command flag to give people more options?

Hey! I'm angry on the sight of this issue.
As @Coeur said, users like me in China need to clone Specs with --depth=1. But you say it would be unfair to all the GitHub users. I totally disagree.
You can make it --unshallow by default but you shouldn't force people git clone --unshallow.
Why there's no such command flag to give people more options?

@AntiMoron

This comment has been minimized.

Show comment
Hide comment
@AntiMoron

AntiMoron Feb 25, 2017

You guys should already know that there's really huge amount of commits. Deep cloning definitely takes lots of time in many countries not only China, etc. Apis should be powerful and flexible but don't force and push users plz.

You guys should already know that there's really huge amount of commits. Deep cloning definitely takes lots of time in many countries not only China, etc. Apis should be powerful and flexible but don't force and push users plz.

@benasher44

This comment has been minimized.

Show comment
Hide comment
@benasher44

benasher44 Feb 28, 2017

Member

Hi @AntiMoron! Thanks for your feedback! We don't provide an option for this in CocoaPods because of the issues experienced by GitHub users, which is explained in detail by a GitHub engineer here. Have a great day!

Member

benasher44 commented Feb 28, 2017

Hi @AntiMoron! Thanks for your feedback! We don't provide an option for this in CocoaPods because of the issues experienced by GitHub users, which is explained in detail by a GitHub engineer here. Have a great day!

@AntiMoron

This comment has been minimized.

Show comment
Hide comment
@AntiMoron

AntiMoron Mar 2, 2017

@benasher44 OIC, but the problem hasn't been solved. I can hardly clone Specs to my pc...
Has the Cocoapods team planning other ways to improve fetching performance such as building up a CDN service just like what 'npm' do?

@benasher44 OIC, but the problem hasn't been solved. I can hardly clone Specs to my pc...
Has the Cocoapods team planning other ways to improve fetching performance such as building up a CDN service just like what 'npm' do?

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Mar 3, 2017

Member

The team is open to proposals for other ways of storing specs metadata for use in dependency resolution, but given everyone works on cocoapods in their free time, it is unlikely any of us will be able to undertake such a substantial project.

Member

segiddins commented Mar 3, 2017

The team is open to proposals for other ways of storing specs metadata for use in dependency resolution, but given everyone works on cocoapods in their free time, it is unlikely any of us will be able to undertake such a substantial project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment