-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add jujutsu support #414
base: master
Are you sure you want to change the base?
Add jujutsu support #414
Conversation
@jamessan seems the most recent reviewer |
588237e
to
4f7ebce
Compare
autoload/sy/repo.vim
Outdated
@@ -645,6 +651,7 @@ let s:default_vcs_cmds_diffmode = { | |||
\ 'accurev': 'accurev cat %f', | |||
\ 'perforce': 'p4 print %f', | |||
\ 'tfs': 'tf view -version:W -noprompt %f', | |||
\ 'jj': 'jj cat -- %f', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be getting the file contents from @-
(ie, jj cat -r @- -- %f
)?
The jj diff
in default_vcs_commands shows the diff between @-
and @
, and practically speaking, @-
is jj's HEAD
analogue.
It's more complicated if @
is a merge, since that would involve synthesising a merged version of the parents' files like jj diff
does. I don't have a good solution for that, unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like it might be what we want yeah. Tbh I'm still not sure exactly sure what signify uses the different commands for.
Some quick testing: With the current setup it seems to default to show the diff compared to @-,but with edits to the buffer it shows the diff compared to @. Tbh, I don't hate that behavior but I suspect it's not what is expected compared to the other vcs implementations here. With -r @-
it behaves more like you would expect. So +1 to fixing that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, jj cat
is deprecated, jj file show
would be the new spelling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I've updated to file show
and set this rev to @-
.
4f7ebce
to
348b881
Compare
Source at https://github.com/martinvonz/jj and hosted docs at https://martinvonz.github.io/jj/latest/.
348b881
to
b478b47
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor comment inline.
@@ -163,6 +163,7 @@ The key can be any from this list: | |||
accurev | |||
perforce | |||
tfs | |||
jj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jj should also be added to the list in the intro section of this document.
patch originally authored by @algmyr
while the default diff does work, the 'working-copy-as-a-commit' semantics of jj mean that it may be preferable to customize the diff range to include the last non-anonymous commit. Unfortunately, there isn't currently an easy way to express this but the following should approximate it: