[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:33:35 CET

Julian Foad wrote:
> Julian Foad wrote:
>> Branko Čibej wrote:
>>
>>> 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.
> [...]
>>
>> I don't accept that diff programs should be expected to handle NUL:.
> [...]
>
> To clarify my position: I have done some general programming under
> DOS/Windows, including stdio, in which I know it is easy to open and
> read "NUL:", but I have less experience of the file-handle APIs that
> are (AFAIK) much more widely used, and cannot definitively answer this
> question. From what little knowledge and experience I have both as a
> programmer and as a user, my impression is that devices (including
> NUL) would often not be supported.
>
> I don't know what Branko's position of authority is on the matter. I
> reacted based on the impression that he was as unqualified as I am;
> apologies if this is not so.
Heh, looks like you got some private mail from somewhere. :)

The special device names are supported by the Win32 (and now Win64...)
API layer directly. As I said, a Windows app would have to go out of its
way to make them _not_ work. Interestingly enough, Word /is/ such an
app, but then it does file locking and all sorts of other "interesting"
things with the file name. I wouldn't expect any reasonable diff/merge
tool to do that, so I'm not worried.

(BTW, since /dev/null is actually a character device, not a regular
file, I suppose it's about as probable that a Unix diff tool refuses to
work with /dev/null as it is that a Windows app chokes on NUL:...).

-- 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:32:10 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.