-
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
Tracking Issue for git2
deprecation
#5548
Comments
I think this is optional, and can be omitted unless required by package maintainers who want to drop libgit2 earlier. |
Agree that it's not super important. Besides the use case you've described, it'd make adding more |
I have remote management fully ported locally and will send a PR tomorrow. I think supporting/testing a feature flag would be nice because it would keep us honest about the ability to drop it. |
I’m curious if will use this library in the future: |
This was already discussed in the Discord, and it will probably be done whenever a version of it will be available. |
This doesn't affect anything here, but I wanted to add in another issue with fetching via libgit2: at Mozilla, we're currently using a git plugin to communicate with a mercurial remote. The plugin modifies the repository URL syntax in a way that libgit2 (or jj using libgit2?) doesn't support. (Example: (That said, I assume |
|
There has been a latent sentiment amongst contributors that
jj
has outgrown its need to depend onlibgit2
, and as such we are moving to replace it and eventually deprecate it. This issue tracks the reasoning for this move, as well as the steps needed to make it happen and a deprecation plan.Steps
push/fetch
. git: spawn a separate git process for network operations #5228gitoxide
.gitoxide
cli/tests: move a lot of the cli tests to gitoxide #5575 #5639git2
code behind a (enabled by default) feature flagpush/fetch
code path to use thegit
subprocess git: enable subprocessing by default #5652git2
git2
Rationale
Issues with
git2
libgit2
(withgit2
being its Rust bindings) is a project to implementgit
as a library so that external applications can interact programmatically withgit
repos without having to shell out to git and parse its output.This effort is commendable and
git2
has been crucial in makingjj
git compatible from the get go. I'd like to emphasize that this is by now means a bash onlibgit2
. However, we have found some pain points with its usage:SSH
. This regularly comes up when users try to push to Github, with over 20 issues opened about it forjj
plus multiple reports a week.libgit2
only supports one version at a time, meaning packagers have a problematic window of time whilejj
has not updated thegit2
to its latest versionlibgit2
, which is interacting withgit
remotes,libgit2
has been reported to be slowChange to what
jj
actually uses anothergit
library to interact with repositories:gitoxide
. This means that, as it stands, we have two libraries for interacting withgit
, which is arguably one too many.As
gitoxide
has become more feature complete, relying ongit2
becomes less desirable.For the remaining cases (which turn out to be simply the
push
/fetch
operations), the consensus is to rely on shelling out to agit
subprocess.The text was updated successfully, but these errors were encountered: