Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkout without cloning #845

Closed
developedby opened this issue May 8, 2023 · 1 comment
Closed

Checkout without cloning #845

developedby opened this issue May 8, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@developedby
Copy link

Summary 馃挕

Currently there isn't an easy way of performing a checkout outside of gix::clone's PrepareCheckout which is not usable outside of this module.
I could use gix-worktree to do the same thing that PrepareCheckout does, but that is quite cumbersome.
I could also use a remote connection to download the needed files, but then it's complicated to persist this to disk.

Since the bulk of the work of fetching and checking out is already done in gix::clone I think it wouldn't be so complicated to move these two functionalities outside, to be usable directly as a function of Repository.

Similar to #726 but for checkout.

Motivation 馃敠

I'm writing a program that will need to checkout between multiple tags of a repository back and forth. The checked out files are then copied outside the repository for further use. While I could do this with git or libgit2, I would prefeer not to have non-Rust dependencies, which is why I tried doing it with gitoxide.

@developedby developedby added the enhancement New feature or request label May 8, 2023
@Byron
Copy link
Owner

Byron commented May 8, 2023

Thanks for taking the time!

Checkouts are such an important part of git, there is no way it would be forgotten or would not be easier to use when it is done. I recommend subscribing to this tracking issue to know when checkout is closing in on completion.

The checkout available now is only suitable for a special case and it's not correct enough to be more than a PoC, with todo!() still sprinkled in.

As this issues doesn't add anything over the respective tracking issue, I will close this one. Please feel free to comment there if anything comes up. Thanks for your understanding.

@Byron Byron closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants