[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Diff: null device instead of empty file? [was: svn commit: r17181 - trunk/subversion/libsvn_wc]

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-11-06 23:24:26 CET

Julian Foad wrote:
> Branko Čibej wrote:
>> Erik Huelsmann wrote:
>>> I'd like to just call external diffs not working with NUL: broken,
>>> though, but should we try to move this change into 1.4RC1 and just
>>> see? I'm all for it.
>> Hm, yes, an external diff could have problems. I'd also call it
>> broken, though -- Cygwin's GNU diff can handle NULL. Unix programs
>> should have no problems at all, because for all they care, /dev/null
>> is just another file.
>> (If someone on Windows uses a diff tool that can't handle a NUL: as a
>> file name, they can write a wrapper for it. I don't think we should
>> cater to every half-ported utility in the world.)
> I don't accept that diff programs should be expected to handle NUL:.
> The distinction between devices and files is greater on MS DOS/Windows
> than on Unix-like OSes, and it would be reasonable for a diff program
> to require regular files.
> $ vim /dev/null
> works fine, but would you expect
> C:\> msword NUL:
> to do so? And that's not a totally unfair comparison. Diff programs
> are not all line-based stdin-reading text stream consumers.
Any diff program we're able to call from SVN will know how to open a
file. There's nothing special about opening NUL: on Windows; you simply
pass "NUL:" to CreateFile or fopen or open or whatever, and it should
Just Work. You have to make a special effort for it not to.

-- Brane

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 6 23:23:42 2005

This is an archived mail posted to the Subversion Dev mailing list.