-
Notifications
You must be signed in to change notification settings - Fork 396
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for custom git extensions #791
Conversation
This would allow one to use git worktrees together with sparse-checkout. Reference: libgit2/libgit2#6031
Allows the use of git worktrees together with sparse-checkout. In order for git2 to open such repositories, we need to tell it that we support the worktreeConfig extension. Fixes starship#3245 This commit requires rust-lang/git2-rs#791
Seems reasonable to me! For the tests though since this modifies global state I think it'd be good to have a separate test executable in |
Thanks for the hint! I have moved the tests to the tests/ folder and rewritten them a bit. They now look like what I initially wanted them to look like, much better :) |
Allows the use of git worktrees together with sparse-checkout. In order for git2 to open such repositories, we need to tell it that we support the worktreeConfig extension. Fixes starship#3245 This commit requires rust-lang/git2-rs#791
Allows the use of git worktrees together with sparse-checkout. In order for git2 to open such repositories, we need to tell it that we support the worktreeConfig extension. Fixes starship#3245 This commit requires rust-lang/git2-rs#791
Since 0.13, a few changes have been made to git2, including rust-lang/git2-rs#791 which should address the extensions.worktreeConfig issue in #195. The upgrade required fixing uses of [ConfigEntries][1] because it's no longer an iterator. [1]: https://docs.rs/git2/0.15.0/git2/struct.ConfigEntries.html However, it provides an API that lends itself well to `while let` to provide a for loop like experience, so this was an easy fix.
This would allow one to use git worktrees together with sparse-checkout.
Reference: libgit2/libgit2#6031