gregsexton/gitv — pull request #55 by pydave (2013-02-14 13:11:51+00:00)
Title: Fix gitv for submodules

Works around a fugitive bug: edit the HEAD-tree instead of the HEAD file. I think this is a better solution since it will avoid future file-path issues. (Assuming fugitive's pseudo files always work correctly.)

After I got that working, using 'u' didn't work (it loaded the root repo's history). It seems there was something wrong with the way gitv was calling git, but calling through to fugitive (instead of git) fixed it.

Now, instead of building our own git command, I'm calling through to `fugitive#buffer().repo().git_command()` (which correctly sets the git-dir). Since we're not calling git directly, I've removed g:Gitv_GitExecutable. The git executable can still be configured through g:fugitive_git_executable.

I've also replaced some other cases where we can get data from fugitive instead of trying to deduce it.

Tested on Ubuntu 12.04.2 and Gvim 7.3.429 with tpope/vim-fugitive/6462bdb.