bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Bug#99807: diff doesn't handle filenames with spaces (fwd)


From: Eli Zaretskii
Subject: Re: Bug#99807: diff doesn't handle filenames with spaces (fwd)
Date: Wed, 6 Jun 2001 16:39:55 +0300 (IDT)

On Wed, 6 Jun 2001, Hans-Bernhard Broeker wrote:

> > I guess then my previous post can be read as a request to make
> > backslash-only quoting the default (at least on non-M$ systems).
> 
> _Please_, by all means, don't make the behaviour of 'diff' depend on the
> platform it's running on. It's very important that diff output remains
> portable across platforms.

I agree.  This means that, for portable results, Diff should use 
backslashes for quoting special characters, and Patch should understand 
that quoting.  Since backslashes as directory separators are not 
portable, and so portable diffs will always use forward slashes, I see 
no ambiguity in this course of action.

Perhaps we should even have special code in Diff for non-Posix platforms 
which will replace all backslashes in file names with forward slashes, 
either by default or as a special option.  That would make sure the 
result can be applied on either type of system.

> Let's also try not to forget about backward compatibility: if remotely
> possible, somewhat stale versions of 'patch' should still be able to
> work with even the latest diff output, and vice versa.

I don't think that back-compatibility considerations apply here, since 
old versions of Patch don't support blanks (and other special characters) 
in file names.  Since Diff only quotes when there's some character that 
needs quoting, only file names unsupported in old Patch versions will be 
quoted with backslashes.



reply via email to

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