On Aug 16, 2007, at 2:27 AM, Mark Levedahl wrote:
Steffen Prohaska wrote:
If reg.exe is not there kdiff3 will not be found. The code will
already be _ignored_. It's just not working.
I'm really thinking forward to when you try to reintegrate this
into git.git: Platform specific code needs to be wrapped with a
test that has a known result on all platforms.
I thought about that, too.
The code works on _all_ platforms as follows:
- if 'REG' is available, its output is parsed for the diffcommand;
- if 'REG' is not available the code is ignored.
The only problem I see with this approach is that the code does not
test if 'REG' was present and returned an error for an unknown reason.
btw, in merge tool we would probably ignore such an error anyway.
What does 'platform specific' mean? Is MINGW the platform? If so,
how about Cygwin? Or is Windows the platform?
Windows will often be the right choice.
So how do we test for Windows?
On my machine uname returns the following in Cygwin and Mingw
- CYGWIN_NT-5.1
- MINGW32_NT-5.1
The patch I sent does not test for platforms, but assumes that 'REG'
will only be available on Windows. Errors will just be ignored, which
is is not perfect. This could be improved by testing first if 'REG' is
available and if so report errors returned by REG.
Assuming that 'REG' is only available on Windows and has a defined
meaning seems to be reasonable assumption to me. I don't see the need
to test which platform the script is running on. Testing if 'REG' is
available seems to be sufficient.
Steffen
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html