Git diff does not create temporary files

I am experiencing something strange when using git. I am using git on my windows 7 machine.

I wanted to see some code changes, so I ran gitk to check what was in the commit I wanted to see. In my list of modified files, I highlight the first file and see the difference to the left of it. But I have a Beyond Compare intalled, and right-click the first file and select "External Diff". This works great and I can split the file in Beyond Compare.

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

When I look at my file system, I see that "git.gitk-tmp.7992" exists (the folder is referenced), but it is empty, and therefore, of course, Beyond Compare and git diffftool cannot pick them up.

Something similar happens when I try to execute "git diffftool" between two branches.

I can’t understand why he won’t create these temporary files?!?

I hope someone can shed some light on this.

thanks

+4
source share
2 answers

I do not know Beyond Compare this well, but I will try:

When you start external diff for the first time, it starts BC. The second time, it starts a new BC process, which finds the previous one, so it sends a message to the first instance, and then exits.

When you click on the external difference in gitk, it creates temporary files, runs the given command, waits for the program to exit, and then deletes the temporary files. When you already have a BC instance, the second ends almost instantly, so you cannot find them.

This is the best I can do - Try digging out the BC guide and forums.

+3
source

Gracchus's answer was in place and helped me solve my problem.

In the case of Beyond Compare, users should use BComp.exe in gitk instead of BCompare.exe (which I used).

BComp.exe:

This is a Win32 GUI program. If it is launched from source control, it should work fine. If it is launched from the console window, the console (or batch file) will not wait for it.

BCompare.exe:

This is the main application. Only one copy is launched at a time, no matter how many windows you open. If you run a second copy, it will report the existing copy to start the comparison and exit immediately.

+2
source

Source: https://habr.com/ru/post/1443657/


All Articles