This is fairly straightforward to do outside of fugitive.vim, and there's no reason to give it privileged treatment here. Closes #403.
Our doautocmd in s:ReplaceCmd already processes the modelines while the buffer is still modifiable, so we can disable it after tha prevent subsequent invocations. Closes #323.
Observed on the OS X Mavericks install of Vim 7.3.
This avoids calling `s:diff_window_count` in the common (non-diff) case.
There are rare situations where a user has manually specified what they wish to use as their work-tree directory, and even rarer situations where the user wishes the Git directory to be customized. In the case the user has set these using environment variables, vim-fugitive takes advantage of these settings in order to set up. Note that git-config(1) allows setting the work-tree and Git dir in a number of ways (see the core.worktree) setting. This change only respects the environment variable method, not the config file method.
- Also store 'args', the git arguments used to generate the temp file
- Change old `Fugitive` to `FugitiveBoot` - Put `Fugitive` at the end of fugitive#detect
The algorithm in fugitive#extract_git_dir() is to move upwards in the file system hierarchy until a sub-directory called .git is found. When accessing a file on a network share from a Cygwin Vim and the file is not within a git repo, this eventually causes a check for the existence of //serverName/.git and //.git. Such checks are extremely slow so let's avoid them.