-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat: vcs: support Jujutsu as a diff-provider #12022
base: master
Are you sure you want to change the base?
feat: vcs: support Jujutsu as a diff-provider #12022
Conversation
d07b9ff
to
601e3a5
Compare
422e761
to
fc7c8d1
Compare
fc7c8d1
to
3bb3fb5
Compare
3bb3fb5
to
35f2ee1
Compare
Hi @poliorcetics, Thanks for this PR, hope it will be merged soon. |
35f2ee1
to
4daf973
Compare
Hi @poliorcetics, Thank you for working on integrating jj into helix, I am using helix from your branch, and it has been great so far. I am new to jj, and this PR is still a draft, but wanted to make a suggestion on the status-line entry, Will |
4daf973
to
c508dd1
Compare
It could easily be done code-wise, but I'm trying to get the same behavior as the If maintainers confirm it would be ok to add, I'll do it :) |
This gets a bit weird with reloading newly-added or untracked files.
Each time the file is reloaded, the diff base is set to the current file. I have somewhat of a fix for this at d4a0e44. If the file is untracked, return early. If the file is new, return an empty base. Otherwise, continue as before. I'm not really a fan of my implementation, since it relies on jj emitting a warning message if the file isn't found in the repo. Could do without that by doing a separate |
Was curious to see what an implementation using |
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