feat: vcs: support Jujutsu as a diff-provider #12022
Draft
+601
−108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Built on top of #9951, I'll be waiting for it to be merged to un-draft this
Jujutsu (
jj
) is a new change-based VCS (whereasgit
is branch-based).In this PR, I add the ability for helix to get the diffs and current head, behind a feature called
jj
that is active by default. That would make it the first editor I know off that officially handles that VCS!To handle all current, future and private backends (Google already has one I believe), I instead made it so Helix can behave as a diff tool for Jujutsu and then use that as a subcommand to get the diff base.
For the head, I simply used the templating system to extract all relevant informations.
Jujutsu has a library, called
jj-lib
but it's not ready for use in third party programs and wouldn't fix the issue of custom backends anyway.Testing
Since testing needs
jj
installed, I haven't written any for Helix yet to discuss how to do it:jj
in CI and use it to test the new feature