bug-diffutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-diffutils] [PATCH] quoting in diff3 on win32


From: Claudio Bley
Subject: Re: [bug-diffutils] [PATCH] quoting in diff3 on win32
Date: Fri, 26 Aug 2011 18:19:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 08/25/2011 01:58 PM, Claudio Bley wrote:
>> Hi.
>>
>> I compiled diffutils for MinGW.
>>
>> diff3.exe does not work with special characters in path names (like
>> spaces et cetera) because it does not quote special characters
>> correctly for the cmd shell when invoking diff.exe.
>
> Gross.

I know. But it works, and that's the most important thing when you have
work to do (other than trying to use a broken tool)...

> It would be better to get the mingw environment to use sh
> instead of cmd

You only need MinGW to compile the programs, basically these are "native"
Windows console applications without a MinGW environment.

> or to at least fix system() or popen() to properly
> munge command lines that assumed sh quoting

How do you decide if a program expects sh quoting or not? I don't think
that would work in the general case. If you're compiling programs on
Win32 (think MinGW, not Cygwin) you would have to expect cmd quoting
rules, no?

> Or, instead of using popen, maybe we could use gnulib's pipe-filter-gi
> module, which allows us to pass the filename as a distinct argv
> argument without the need for any extra quoting to be undone by an
> intermediate shell.

Thanks for the pointer, I'll investigate that further when I have the
time. Don't hold your breath, though.

> All in all, while I appreciate your attempt to make this more robust
> on mingw, I think this patch is going about a solution in the wrong
> way.

No problem. Actually, I originally tried to fit that into gnulib's
quoting mechanism, but it didn't fit in there (easily) and I gave up,
frustrated. I just had forgotten about that try, only had this diff
lying around here...

Cheers,
Claudio




reply via email to

[Prev in Thread] Current Thread [Next in Thread]