-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to git fetch only specified commit #10137
Conversation
Is there a corresponding issue? |
Also happy to add tests if someone can provide guidance on where is the appropriate place (git_repository_test.sh? skylark_git_repository_test.sh? GitRepositoryBlackBoxTest.java?). |
9b15c2f
to
c26902c
Compare
The Git server config setting uploadpack.allowReachableSHA1InWant and friends allow git fetch to request a particular commit, which is more efficient than fetching all refs and then checking out the commit locally. Attempt to do this, and fall back to fetching everything if it fails.
c26902c
to
e9fdd35
Compare
This seems reasonable and non-breaking, so we won't have to guard it with an incompatible flag. I think it addresses @aehlig's comment about it being opt-in, and no overhead if they server does not support the feature. At least, that was how I read the code. @HackAttack Do you think you can add a test to any of the places you listed? Maybe the black box test. |
The Git server config setting uploadpack.allowReachableSHA1InWant and friends allow git fetch to request a particular commit, which is more efficient than fetching all refs and then checking out the commit locally. Attempt to do this, and fall back to fetching everything if it fails. Resolves bazelbuild#8969 Closes bazelbuild#10137. PiperOrigin-RevId: 333298608
The Git server config setting uploadpack.allowReachableSHA1InWant and friends allow git fetch to request a particular commit, which is more efficient than fetching all refs and then checking out the commit locally. Attempt to do this, and fall back to fetching everything if it fails.
Resolves #8969