junegunn/gv.vim

GV from within a GV tab causes duplicated git history

idbrii opened this issue · 0 comments

Loading GV from within a GV causes duplicated git history. Seems to only be a problem if the two GV commands are identical.

With minimal vimrc ~/.vim/reprovimrc.vim:

let s:plugins = ['sensible']
let s:plugins += ['fugitive']
let s:plugins += ['git-gv']

set runtimepath-=~/.vim
set runtimepath-=~/.vim/after
set runtimepath-=~/vimfiles
set runtimepath-=~/vimfiles/after
for plugin in s:plugins
    exec "set runtimepath^=~/.vim/bundle/". plugin
    exec "set runtimepath+=~/.vim/bundle/". plugin ."/after"
endfor
set viminfofile=NONE

On latest gv run :GV twice:

$ git show --oneline
61d877d (HEAD -> master) Disable modelines in scratch buffers (#81)
$ vim -Nu ~/.vim/reprovimrc.vim -U NONE +GV +GV +g/master\)
$ vim -Nu ~/.vim/reprovimrc.vim -U NONE +"GV --all" +"GV --all"  +g/master\)

You'll see the master branch shows up twice in both cases.