From cf1b8d1b947f1213ce02bb8fcf04001509aab68b Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 1 Mar 2024 20:01:01 +0800 Subject: Use relative path when using git diff --- .vim/after/plugin/fzf.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.vim') 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({ -- cgit v1.2.3