Search code examples
gitdiffgitk

git diff does not create temp files


I am experiencing something a bit weird when using git. I am using git on my Windows 7 machine.

I wanted to review some code changes, so I fired up gitk to check what was in the commit I wanted to review. In my list of changed files i highlight the first file and can see the diff to the left of that. But I have Beyond Compare intalled, and right click the first file and choose "External Diff". This works fine, and I can diff the file in Beyond Compare.

But when I try to do the same with the second file, it fails. Beyond Compare opens, and I can see that two files are displayed in the paths, but they don't exist.

When I go look at my filesystem I can see that "git.gitk-tmp.7992" exists (the folder refernced) but it is empty, and therefore of course Beyond Compare and git difftool can't pick them up.

Something similar happens when I try to do a "git difftool" between two branches.

I can't figure out why it won't create those temp file?!?

I am hoping somebody can shed a little light on this.

Thanks


Solution

  • I don't know Beyond Compare that well, but I'll give it a try :

    When you run the external diff the first time, it launches BC. The second time, it launches a new BC process, which find the previous one, so it sends a message to the first instance, then quits.

    When you click on external diff in gitk, it creates temp files, run the given command, wait for the program to exit, then delete temp files. When you already have an instance of BC, the second one quits almost instantly, so you can't find them.

    That's the best I can do - Try digging BC's manual and forums.