Retry a full clone when git server does not support shallow capabilities#7649
Conversation
|
Thanks for opening a pull request and helping make RubyGems and Bundler better! Someone from the RubyGems team will take a look at your pull request shortly and leave any feedback. Please make sure that your pull request has tests for any changes or added functionality. We use GitHub Actions to test and make sure your change works functionally and uses acceptable conventions, you can review the current progress of GitHub Actions in the PR status window below. If you have any questions or concerns that you wish to ask, feel free to leave a comment in this PR or join our #rubygems or #bundler channel on Slack. For more information about contributing to the RubyGems project feel free to review our CONTRIBUTING guide |
|
@llenk thank you! It was great working with you at RailsConf. |
deivid-rodriguez
left a comment
There was a problem hiding this comment.
Added a minor style comment but looks good to me other than that.
martinemde
left a comment
There was a problem hiding this comment.
I like the revisions. Looks more general now. Maybe even a pattern to follow if there's other ways to back off the command when it doesn't work.
simi
left a comment
There was a problem hiding this comment.
🤔 IMHO best would be to be able to check if remote supports "shallow capabilities", but I wasn't able to find out generic way to find out.
|
@llenk would you mind to squash commits please before merge? |
I was considering that, but (in addition to not being obvious how to do it) since most servers these days support them, it felt better to optimize for that case, and react when servers don't support it, instead of detecting support upfront. |
deivid-rodriguez
left a comment
There was a problem hiding this comment.
Thanks for the great work here!
|
Oops, I didn't notice it wasn't squashed yet. It's only 1 extra commit so I won't feel too bad 😉 |
Fix gems not downloading when shallow clone unavailable (cherry picked from commit 72635d3)
What was the end-user or developer problem that led to this PR?
#7547
What is your fix for the problem, implemented in this PR?
The depth arguments in the git command were causing the problem. If we get the error on the first try, we remove the depth arguments from the command and try again.
Make sure the following tasks are checked