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: Andreas Gruenbacher
Subject: Re: [bug-diffutils] diff: support for --no-dereference option
Date: Sun, 08 Jan 2012 12:57:42 +0100

On Sun, 2012-01-08 at 03:22 +0100, Bruno Haible wrote:
> Andreas Gruenbacher wrote:
> > In the two directories case, I really don't see when following symlinks
> > would be desirable.  Here, diff is comparable to a tool like tar, for
> > example -- in the tar case, I want to archive what's really there; in
> > the diff case, I want to compare what's really there.
> 
> Take an example. I often move subdirectories and big files from one disk
> to another one, for disk space reasons, and leave in a symlink that points
> to the new location. When I now prepare a backup, I'll use "tar chf -".
> And to compare the backup with the original contents, I use "diff -r".
> 
> I claim that this use-case is more frequent than the one which does not
> follow symlinks.

You lose symlinks anywhere in the entire backup.  This may be fine in
your particular case, but it sure isn't what most users will expect.

> Proof: GNU diff users were happy with the existing behaviour
> for 20 years.

GNU diff currently is unsuitable to comparing arbitrary directory trees
because the diff format cannot represent arbitrary differences.  Most
users probably leave it at that once they figure out.  This discussion
is about ways to rectify the situation though.

Thanks,
Andreas




reply via email to

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