From 939c68a06c336a5bd2e024d0d51f83d4dcc5697c Mon Sep 17 00:00:00 2001 From: Eyvind Bernhardsen Date: Sat, 23 Nov 2024 15:56:00 +0100 Subject: [PATCH] Add support for jj --- autoload/sy/repo.vim | 9 ++++++++- doc/signify.txt | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index f651c29..ccdefb2 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -225,6 +225,11 @@ function! s:check_diff_perforce(exitval, diff) abort return a:exitval ? [0, []] : [1, a:diff] endfunction +" s:check_diff_jujutsu {{{1 +function! s:check_diff_jujutsu(exitval, diff) abort + return a:exitval ? [0, []] : [1, a:diff] +endfunction + " s:check_diff_tfs {{{1 function! s:check_diff_tfs(exitval, diff) abort return a:exitval ? [0, []] : [1, s:strip_context(a:diff)] @@ -629,7 +634,8 @@ let s:default_vcs_cmds = { \ 'rcs': 'rcsdiff -U0 %f 2>%n', \ 'accurev': 'accurev diff %f -- -U0', \ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') . (has('win32') ? ' &&' : ' && env P4DIFF= P4COLORS=') .' p4 diff -du0 %f', - \ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f' + \ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f', + \ 'jujutsu': 'jj diff --no-pager --color=never --git --context=0 -- %f', \ } let s:default_vcs_cmds_diffmode = { @@ -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', + \ 'jujutsu': 'jj file show --no-pager -r @- -- %f', \ } if exists('g:signify_vcs_cmds') diff --git a/doc/signify.txt b/doc/signify.txt index 77e358a..35e6c53 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -48,6 +48,7 @@ Supported VCS:~ accurev perforce tfs + jujutsu yadm < ============================================================================== @@ -163,6 +164,7 @@ The key can be any from this list: accurev perforce tfs + jujutsu Modifiers:~ @@ -201,7 +203,8 @@ Default: \ 'rcs': 'rcsdiff -U0 %f 2>%n', \ 'accurev': 'accurev diff %f -- -U0', \ 'perforce': 'p4 info '. sy#util#shell_redirect('%n') . (has('win32') ? ' &&' : ' && env P4DIFF= P4COLORS=') .' p4 diff -du0 %f', - \ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f' + \ 'tfs': 'tf diff -version:W -noprompt -format:Unified %f', + \ 'jujutsu': 'jj diff --no-pager --color=never --git --context=0 -- %f', \ } < ------------------------------------------------------------------------------ @@ -219,6 +222,7 @@ Default: \ 'accurev': 'accurev cat %f', \ 'perforce': 'p4 print %f', \ 'tfs': 'tf view -version:W -noprompt %f', + \ 'jujutsu': 'jj file show --no-pager -r @- -- %f', \ } < The command to use for updating signs in a `modified` buffer, thus when the