Support shallow sync when the rev is not in-range #615
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 1
and a branch, it's fine.If I ask for
--depth 1
and a tag, and that tag is not within 1 commitof 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 ofhow we
fetch
. But if it is too far away at the beginning, kaboom.This betrays that the current model of
--branch
and--rev
is 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