Implement object checkout in PrepareCheckout
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 using util::update_head and refactoring it to use oid, though I leave that decision up to you if you have a better idea.
Apologies for the lack of tests as well.
Tasks:
- [x] Checkout tree associated with the
oidof the revision used. - [ ] Update the
HEADwithutil::update_headto use the correct detached state. - [ ] Add tests ensuring this works as intended
- [ ] Shallow clone with specific revision, then checkout.
- [ ] Standard clone while checking out specific revision
Alright, I added some tasks as requested though the extent of my knowledge with this process is limited so there might be more things I'm not aware of.
Thanks for giving this a shot! As the new year is looming, I am closing PRs that can't move and that I can't take over. Thus, sadly, this one is among them but at the same time I encourage to reopen it feels right. Thanks for your understanding.