[darcs-devel] [issue2423] diff only respecting --diff-command when a diff.exe is present

Christian Harnisch bugs at darcs.net
Sun Nov 30 15:54:39 UTC 2014


New submission from Christian Harnisch <chr.harnisch at gmx.net>:

Greetings,

I have found a bug regarding the "darcs diff" command under Windows.
I'm using the binary distribution, so it's version 2.8.1 on a Windows 7
64-bit system.

Problem description:
No matter what options I tried, the diff command would always respond
"darcs failed:  Cannot find the "diff" program.", completely ignoring what
other diff program I wanted to use.

This is what I tried:
- Put "diff diff-command WinDiff %1 %2" (without the quotes) into the
defaults file for the repository
- Put the same line into the global defaults file
- darcs diff --diff-command "WinDiff %1 %2"
- darcs diff --diff-command="..."
- Tried adding the file extension (-> "WinDiff.exe"), tried supplying the
complete path, tried supplying the complete path in 8.3-Format
("C:\Progra~1\...")
- Used variants like 'diff --diff-command ...' or 'diff diff-command
"WinDiff %1 %2"' for the defaults files and command arguments
- Tried using other diff programs: KDiff3 and Meld
- Tried 32-bit and 64-bit variants of KDiff3.
None of these steps had any effect on finding the diff program.

Workaround:
Put a file called "diff.exe" somewhere on PATH. E.g. duplicate any diff
program executable and rename it to diff.exe. "darcs diff" then properly
uses the configured (or passed via --diff-command) program.
For example, darcs diff --diff-command "meld %1 %2" would then properly
result in the message:
Running command 'meld old-second new-second'

Apparently, "darcs diff" first searches for a "diff.exe", and fails if it
can't find it. Only if it can will it actually evaluate what diff program
is configured. In that case, it doesn't even use the diff.exe: A renamed
empty text file works just fine.

Expected behaviour: Search for diff.exe only if nothing else is
configured. If a different diff program is supplied, only use that.


If you need more information, I'm happy to answer your questions.

With kind regards,
Christian Harnisch


P.S.: I'm sending this a second time (cancelled the first message),  
because I forgot to add something I also tried.

----------
messages: 17869
nosy: chr.harnisch
status: unknown
title: diff only respecting --diff-command when a diff.exe is present

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2423>
__________________________________


More information about the darcs-devel mailing list