Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[BUG] Gdiff when wildignore is set #181

Closed
wants to merge 1 commit into from

2 participants

@flatcap

When the file you're editing matches the vim variable wildignore
Gdiff fails. Saving/restoring &wildignore solves the problem.

@flatcap flatcap [BUG] wildignore breaks Gdiff
When the file you're editing matches the vim variable wildignore
Gdiff fails.  Saving/restoring &wildignore solves the problem.
144842a
@tpope
Owner

One problem with this approach is that 'wildignore' won't get restored if something goes wrong in the middle. It's safer to just change ' `=spec`' to ' '.s:fnameescape(spec). Could you implement that instead? Thanks.

@tpope
Owner

Closed by #182.

@tpope tpope closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 31, 2012
  1. @flatcap

    [BUG] wildignore breaks Gdiff

    flatcap authored
    When the file you're editing matches the vim variable wildignore
    Gdiff fails.  Saving/restoring &wildignore solves the problem.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 0 deletions.
  1. +3 −0  plugin/fugitive.vim
View
3  plugin/fugitive.vim
@@ -1359,11 +1359,14 @@ function! s:Diff(bang,...)
try
let spec = s:repo().translate(file)
let commit = matchstr(spec,'\C[^:/]//\zs\x\+')
+ let oldwig = &wildignore
+ let &wildignore = ""
if s:buffer().compare_age(commit) < 0
execute 'rightbelow '.split.' `=spec`'
else
execute 'leftabove '.split.' `=spec`'
endif
+ let &wildignore = oldwig
call s:diffthis()
wincmd p
call s:diffthis()
Something went wrong with that request. Please try again.