gitoxide icon indicating copy to clipboard operation
gitoxide copied to clipboard

Implement object checkout in PrepareCheckout

Open Fernthedev opened this issue 1 year ago • 1 comments

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 oid of the revision used.
  • [ ] Update the HEAD with util::update_head to 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

Fernthedev avatar Aug 01 '24 23:08 Fernthedev

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.

Fernthedev avatar Aug 02 '24 17:08 Fernthedev

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.

Byron avatar Dec 21 '24 18:12 Byron