motiejus/dotfiles

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.jakstys.lt/motiejus/dotfiles.git
Log | Tree | Refs | README | LICENSE

commit 21b6dd7aeec3e4bc96d7b32cd594b7818c0c4082 (tree)
parent 935a2cccd3065b1322fb2235285d42728600afdf
Author: Eli Young <elyscape@gmail.com>
Date:   Fri, 20 Feb 2015 17:15:14 -0800

Show all untracked files in :Gstatus window

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.

Diffstat:
Mplugin/fugitive.vim | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim @@ -2425,13 +2425,16 @@ function! s:BufReadIndex() abort else let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd ' let dir = getcwd() - if fugitive#git_version() =~# '^0\|^1\.[1-7]\.' + if fugitive#git_version() =~# '^0\|^1\.[1-3]\.' let cmd = s:repo().git_command('status') + elseif fugitive#git_version() =~# '^1\.[4-7]\.' + let cmd = s:repo().git_command('status', '-u') else let cmd = s:repo().git_command( \ '-c', 'status.displayCommentPrefix=true', \ '-c', 'color.status=false', \ '-c', 'status.short=false', + \ '-c', 'status.showUntrackedFiles=all', \ 'status') endif try