Skip to content
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 jujutsu support #414

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

msuozzo
Copy link

@msuozzo msuozzo commented Jun 7, 2024

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:

let g:signify_vcs_cmds.jj = 'jj diff --color=never --git --context=0 --from=''parents(heads(::@ & description(glob:"?*"))&mutable()) | ~(heads(::@ & description(glob:"?*"))&mutable())&heads(::@ & description(glob:"?*"))'' -- %f'

@msuozzo
Copy link
Author

msuozzo commented Jun 7, 2024

@jamessan seems the most recent reviewer

autoload/sy/repo.vim Outdated Show resolved Hide resolved
@msuozzo msuozzo force-pushed the push-rlxuvottqssu branch from 588237e to 4f7ebce Compare June 9, 2024 01:31
@jamessan jamessan mentioned this pull request Dec 9, 2024
@@ -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',
Copy link

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.

@jamessan jamessan linked an issue Dec 27, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for jujutsu
3 participants