If the previous window no longer exists when Gedit is called, the
attempt to change windows with 'wincmd p' fails and 'wincmd w' should be
used instead.
The option `status.showUntrackedFiles=all` used with `git status` for
`:Gstatus` might cause an error, which then causes fugitive to display an
empty status window / index file.
Redirecting the stderr output is useful in this case.
The generated command was:
git --git-dir=/home/user/.dotfiles/.git -c 'status.displayCommentPrefix=true' -c 'color.status=false' -c 'status.short=false' -c 'status.showUntrackedFiles=all' status
The error from git is related to submodules being moved to another
subdirectory, where the relative "gitdir" now does not exist anymore:
fatal: Not a git repository: vim/bundle.old.nobackup/CLEAN/colorscheme-base16/../../../.git/modules/vim/bundle/colorscheme-base16
While that's a Git / user error after all, fugitive should be more
helpful in that case by displaying the error.
It uses the 'shellpipe' setting to detect if '2>&1' is supported (Ref:
https://github.com/tpope/vim-fugitive/pull/661#issuecomment-120438667).
Closes#661.
Closes https://github.com/tpope/vim-fugitive/issues/686
For example, when running:
:Git add %
neovim throws the following exception:
E499: Empty file name for '%' or '#',
only works with ":p:h": terminal git add %
It is a result of the tabnew command, it creates a new blank tab where
"%" is empty.
This commit changes "tabnew" to "tabedit %" so you're still working on
the same file.
Once the command is done running the tab closes.
Previously, if there were untracked files inside an untracked folder,
:Gstatus would only show the new folder. Attempting to run a diff on the
folder would pass the directory name, which would result in Vim opening
a directory listing. This makes :Gstatus list all untracked files, even
if they're inside untracked folders. This requires Git >=1.4, and will
silently fall back to the old behavior on earlier versions.
Closes#605.
This is nothing more than a change in personal preference on my part.
It's particularly annoying when :Gstatus or the quickfix window is the
only other window open.
- Color were causing to appear strange characters in the result.
- These characters made impossible to navigate the results
- The solution was to disable colors while executing git grep
This is more reliable and fixes an issue where the syntastic location
list of the original file would be focused after `:Gdiff`.
Ref: c99f0ff06b (commitcomment-9434351)