mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
GIT_INDEX_FILE is typically set to index.lock when Vim is invoked by `git commit`. This effectively breaks Fugitive if you try to use it in a different repository while inside that Vim session. To remedy this, we can instead point GIT_INDEX_FILE at the index file for the relevant repository. This also retools command preparation to allow for general purpose environment variable overrides.