I use kdiff3 as my git mergetool. With kdiff3 version 0.9.97 installed, I am unable to save files when in kdiff3 is invoked by Git. When I downgrade to 0.9.96, everything works fine. The problem seems to be that when the output file is passed to kdiff3 with the -o parameter, kdiff3 doesn't turn that into a file:// path. That seems to be fine with version 0.9.96, but version 0.9.97 refuses to save until I edit the output location and ensure that it uses a file:// path. Reproducible: Always Steps to Reproduce: If I do a merge: kdiff3 ./file1.txt ./file2.txt ./file3.txt -o file.txt .. then save the result, two alert popups appear. The first says: Could not start process Unable to create io-slave: klauncher said: Unknown protocol ''. The second says: While trying to make a backup, renaming failed. Filenames: file.txt -> file.txt.orig Creating backup failed. File not saved. If I then do File => Open, and continue without saving, I see the correct filenames listed in A, B, and C, all prefixed with file://, but the output box just says "file.txt" (not prefixed with file://). If I say OK and continue without making changes, the same problem occurs. However if I fixup the output box by clicking the "File..." button and selecting the output file, it is now prefixed with file://, and I am able to click OK then save my merge result. Version 0.9.96 shows the same behavior in the File => Open window, but despite the output file not being prefixed with file://, everything seems to work fine. Actual Results: Two alert popups appear. The first says: Could not start process Unable to create io-slave: klauncher said: Unknown protocol ''. The second says: While trying to make a backup, renaming failed. Filenames: file.txt -> file.txt.orig Expected Results: File was saved
Thanks for reporting. Fixed in the git repo on sourceforge. Joachim
GIt's mergetool kdiff3 still uses "-o" parameter. The file https://github.com/git/git/blob/master/mergetools/kdiff3 is identical to the one on my local machine, but I still has the problem. A error occurs only if a file with the name, specified by "-o" parameter exists. As for me, the following diff works fine: --- kdiff3_orig 2013-02-05 12:02:40.795566548 +0400 +++ kdiff3 2013-02-05 12:00:29.279060587 +0400 @@ -11,7 +11,7 @@ --L1 "$MERGED (Base)" \ --L2 "$MERGED (Local)" \ --L3 "$MERGED (Remote)" \ - -o "$MERGED" "$BASE" "$LOCAL" "$REMOTE" \ + -o `pwd`/"$MERGED" "$BASE" "$LOCAL" "$REMOTE" \ >/dev/null 2>&1 else "$merge_tool_path" --auto \
Reopening based on comment #2
Please verify with lastest kdiff3 I am unable to repo.