bug-diffutils
[Top][All Lists]
Advanced

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

Re: [bug-diffutils] diff: support for --no-dereference option


From: Bruno Haible
Subject: Re: [bug-diffutils] diff: support for --no-dereference option
Date: Sun, 08 Jan 2012 19:48:02 +0100
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Hi Paul,

> > 'patch' does not break through this additional lines. It simply ignores 
> > them.
> 
> True, hence the proposed patch can be an intermediate one on
> the way to building a better one.

OK. Can I thus commit the patch that introduces --no-dereference?

> But I suppose that we should
> document that the output format is likely to change, so that
> people are less likely to depend on it.

It depends whether you want to work on that before the next diffutils
release.

> > But -P currently is equivalent to --unidirectional-new-file.
> 
> Yeouch.  I forgot about that.  You're right, we'd need to take the
> next step in deprecating -P.  (The first step was taken in 2002, when
> it was removed from the documentation, precisely for this reason --
> can you tell that this has been on the TODO list for some time?...)
>
> We also would need to deprecate -H and -L.  -H has no effect anyway

Rather, -H and -L are also undocumented, like -P.

> Given the large set of changes, and the likely use of -P and -L in scripts,
> I expect that the first deprecation step should just warn on stderr and 
> continue,
> rather than having a fatal error.

I don't think that would be good. A warning is too easily overlooked.
When a user has overlooked the warning, the change in semantics will hit
him just a like a silent change.

And I don't think many people use these options -P, -H, -L: They are
undocumented.

> and probably --speed-large-files should be removed from the documentation
> too (though still a no-op for backward compatibility).

Really?? --speed-large-files is essential for users who need to reduce
the running time from O(N²) to O(N). When you diff files of 100 MB or so,
it becomes important.

> As far as the long option names go, the GNU utilities aren't
> consistent here, but perhaps we should use this for diffutils:
> 
>    -P == --no-dereference (as in cp, du)
>    -H == --dereference-command-line (as in ls)
>    -L == --dereference (as in cp, du, ls, stat)
> 
> omitting the short options for now, as the old meanings are being deprecated.

I agree. Can I commit the --no-dereference patch and leave the rest to you?

Find attached the updated proposals.

Bruno

Attachment: 0001-New-option-no-dereference.patch
Description: Text Data

Attachment: 0002-Deprecate-old-option-P.patch
Description: Text Data

Attachment: 0003-Deprecate-old-option-H.patch
Description: Text Data

Attachment: 0004-Deprecate-old-option-L.patch
Description: Text Data


reply via email to

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