Support shallow sync when the rev is not in-range#615
Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom Aug 30, 2022
Merged
Support shallow sync when the rev is not in-range#615k8s-ci-robot merged 1 commit intokubernetes:masterfrom
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
Conversation
If I ask for `--depth 1` and a branch, it's fine. If I ask for `--depth 1` and a tag, and that tag is not within 1 commit of the branch that was cloned, it will give an error. Oddly, if the initial `clone` was OK, and subsequent syncs drift, it is OK, because of how we `fetch`. But if it is too far away at the beginning, kaboom. This betrays that the current model of `--branch` and `--rev` is really broken, and should be revamped. For now, I did something simple - if the rev can't be found, try a fetch. A "real" fix is more involved. Also add tests.
cd4d4e3 to
ff0a73f
Compare
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: stp-ip, thockin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If I ask for
--depth 1and a branch, it's fine.If I ask for
--depth 1and a tag, and that tag is not within 1 commitof the branch that was cloned, it will give an error. Oddly, if the
initial
clonewas OK, and subsequent syncs drift, it is OK, because ofhow we
fetch. But if it is too far away at the beginning, kaboom.This betrays that the current model of
--branchand--revis reallybroken, and should be revamped. For now, I did something simple - if
the rev can't be found, try a fetch. A "real" fix is more involved.
Also add tests.
Fixes #601