Skip to content

Commit

Permalink
Enable text conversion in git-show
Browse files Browse the repository at this point in the history
This tells git-show to output the smudged version of a file if a
clean/smudge filter is defined for it.  In turns this allows us to diff
the buffer contents (which is smudged) against the reference version.

However patches cannot be applied.

See the man pages for git-show and gitattributes for more information.

See airblade#796, airblade#435.
  • Loading branch information
airblade committed Jun 2, 2023
1 parent 11d6e13 commit 4ec072d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/gitgutter/diff.vim
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function! gitgutter#diff#run_diff(bufnr, from, preserve_full_diff) abort

" Write file from index to temporary file.
let index_name = gitgutter#utility#get_diff_base(a:bufnr).':'.gitgutter#utility#repo_path(a:bufnr, 1)
let cmd .= g:gitgutter_git_executable.' '.g:gitgutter_git_args.' --no-pager show '.index_name.' > '.from_file.' && '
let cmd .= g:gitgutter_git_executable.' '.g:gitgutter_git_args.' --no-pager show --textconv '.index_name.' > '.from_file.' && '

elseif a:from ==# 'working_tree'
let from_file = gitgutter#utility#repo_path(a:bufnr, 1)
Expand Down

0 comments on commit 4ec072d

Please sign in to comment.