Permalink
Browse files

Merge branch 'develop'

  • Loading branch information...
akiomik committed Mar 7, 2013
2 parents e4575e4 + 382e950 commit 78dd992b7a603c4ace32168a93c162939dc7dd8f
Showing with 4 additions and 2 deletions.
  1. +4 −2 autoload/gitgutter.vim
View
@@ -110,9 +110,11 @@ endfunction
" get different between HEAD and current
" current: current file path
function! s:get_diff(current)
- let filename = expand("%") " NOTE: %:p だとフルパス
+ let filename = expand("%")
+ let prefix = system('git rev-parse --show-prefix')[ :-2]
+ echo 'git show HEAD:' . prefix . filename . ' | diff - ' . a:current
- let diff = system('git show HEAD:./' . filename . ' | diff - ' . a:current)
+ let diff = system('git show HEAD:' . prefix . filename . ' | diff - ' . a:current)
return split(diff, '\n')
endfunction

0 comments on commit 78dd992

Please sign in to comment.