Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gdiff not working after updating to Git 2.5.0 #680

Closed
petobens opened this issue Aug 24, 2015 · 12 comments
Closed

Gdiff not working after updating to Git 2.5.0 #680

petobens opened this issue Aug 24, 2015 · 12 comments

Comments

@petobens
Copy link

With the following minimal vimrc:

set nocompatible

let $ONEDRIVE_HOME = expand('C:/OD/Users/Pedro')
let $DOTVIM = expand('$ONEDRIVE_HOME/vimfiles')

set runtimepath+=$DOTVIM/bundle/fugitive/
filetype plugin indent on

If I open Gvim, start editing a file with uncommited changes and run :Gdiff I get an error stating:

Error detected while processing function <SNR>64_Diff:
line   51:
E97: Cannot create diffs

I read this issue but the solution posted there doesn't work in my Windows machine since set shellcmdflag? returns shellcmdflag=/c.

For the record :Gdiff worked just fine until yesterday when I decided to update from Git 1.9.0 to Git 2.5.0.

Any help will be greatly appreciated. Thanks in advance.

@tpope
Copy link
Owner

tpope commented Aug 25, 2015

Try doing it manually:

:diffthis
:Gsplit
:diffthis

Same error?

@petobens
Copy link
Author

Hi @tpope . Thanks for the quick reply. Doing it manually generates the same E97: Cannot create diffs error.

@tpope
Copy link
Owner

tpope commented Aug 25, 2015

On which step?

@petobens
Copy link
Author

On the last one.

For the record: I use this 64bit Vim build, I installed Git 2.5.0 from here and I have C:\prog-tools\Git\cmd in my path. All other fugitives commands (such as Glog, Gstatus, Gcommit) work fine.

@tpope
Copy link
Owner

tpope commented Aug 25, 2015

If it's on :diffthis then it has nothing to do with fugitive. My guess is the new version of Git came with its own version of diff that's getting in the way.

@tpope tpope closed this as completed Aug 25, 2015
@petobens
Copy link
Author

@tpope, I have no idea if this is in fact the cause of my problem but according to this answer Git 2.5 added winmerge as a builtin tool.
I'm sorry for a new question (but I'm completely lost): if the new version of Git has a its own version of diff that might be getting in the way, can you suggest possible workaround? Once again thanks for the help.

@justinmk
Copy link
Contributor

@petobens What does :!where diff report from gvim?

@petobens
Copy link
Author

Hi @justinmk, thanks for your interest. !where difffrom Gvim returns an error: INFO: Could not find files for the given patterns(s).. Where should the diff executable be located? Once again thanks.

@justinmk
Copy link
Contributor

Oh, I get it. The tuxproject build does not include diff.exe, they really need to fix that. And Vim should really show a better error message that avoids this pain for new users.

@justinmk
Copy link
Contributor

Just plop a diff.exe in the top level of your vim/ program files folder.

@petobens
Copy link
Author

@justinmk thank you!! I copied the diff.exe from C:\prog-tools\Git\usr\bin to my top level vim directory and the problem is solved. Thank you once again!!

@petobens
Copy link
Author

@justinmk also thanks for your awesome work in neovim! (I hope to try it one of these days on Windows) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants