Implement object checkout in PrepareCheckout #1483
Draft
+28
−11
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.
In continuation of #1403, I implemented
with_object_id
to allow checking out specific commits such as is the case in submodules.This currently does not include any test cases as of writing this. However, I did make sure this worked from a high level in my project
Though this does not properly update the
HEAD
and may not clone properly. Hoping I can fix it by usingutil::update_head
and refactoring it to useoid
, though I leave that decision up to you if you have a better idea.Apologies for the lack of tests as well.
Tasks:
oid
of the revision used.HEAD
withutil::update_head
to use the correct detached state.