Skip to content

Commit

Permalink
Cope with new "Changes not staged" heading
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Apr 24, 2011
1 parent 68b3f3b commit a71120c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/fugitive.vim
Expand Up @@ -640,9 +640,9 @@ function! s:StagePatch(lnum1,lnum2) abort

for lnum in range(a:lnum1,a:lnum2)
let line = getline(lnum)
if line == '# Changes to be committed:'
if line ==# '# Changes to be committed:'
return 'Git reset --patch'
elseif line == '# Changed but not updated:'
elseif line =~# '^# Change\%(d but not updated\|s not staged for commit\):$'
return 'Git add --patch'
endif
let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$')
Expand Down

0 comments on commit a71120c

Please sign in to comment.