aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2024-03-01 20:01:01 +0800
committerGuangxiong Lin <[email protected]>2024-03-01 20:01:01 +0800
commitcf1b8d1b947f1213ce02bb8fcf04001509aab68b (patch)
tree3e29d63e31d3efb6b7159f690d34bd2b885dfd82
parentb9390cbb0c013a67bc2f962c52e66cddd1c1874d (diff)
downloaddotfiles-cf1b8d1b947f1213ce02bb8fcf04001509aab68b.tar.gz
dotfiles-cf1b8d1b947f1213ce02bb8fcf04001509aab68b.tar.bz2
dotfiles-cf1b8d1b947f1213ce02bb8fcf04001509aab68b.zip
Use relative path when using git diff
-rw-r--r--.vim/after/plugin/fzf.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/.vim/after/plugin/fzf.vim b/.vim/after/plugin/fzf.vim
index 4812000..5b23416 100644
--- a/.vim/after/plugin/fzf.vim
+++ b/.vim/after/plugin/fzf.vim
@@ -32,7 +32,10 @@ function! s:fzf_qf_sink(line) abort
endfunction
let s:command_git_main_branch = 'git symbolic-ref --short refs/remotes/origin/HEAD'
-let s:command_git_patch_files_changed = 'git diff --name-only --merge-base $('
+let s:command_git_patch_files_changed = 'git diff'
+ \ . ' --name-only'
+ \ . ' --relative'
+ \ . ' --merge-base $('
\ . s:command_git_main_branch . ')'
command! FzfQuickFix call fzf#run({