[Top][All Lists]
[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 00:07:40 +0100 |
On Sat, 2012-01-07 at 12:51 -0800, Paul Eggert wrote:
> Thanks for the patch! I would like to fold something like
> this in.
>
> Two thoughts.
>
> First, many programs (e.g., cp) have three options:
> -H -L -P. These distinctions seem to be useful for diff.
> This suggests that the new --no-dereference flag should
> be -P, not -h. -h has a subtly different meaning from
> -P, in programs like chown.
>
> Changing the patch to use -P instead of -h should be easy;
> we can implement -H and -L later as need be.
I wonder if comparing symlinks (instead of what they point to) shouldn't
become the default once diff supports it. At the very least, diff
should warn when following symlinks though.
> Second, and more important, the output of --no-dereference
> should be something that we can feed to an (augmented)
> 'patch' so that it can alter a copy of the old tree,
> symlinks and all, so that it looks like the new tree,
> symlinks and all. This suggests that the output of
> 'diff' needs to contain the symlink contents, and needs
> to distinguish symlinks from regular files, so that 'patch'
> can reconstruct the symlinks.
Binary files, file permissions, copied/renamed files, creation/deletion
of empty files also are not supported by diff currently. Alpha versions
of patch already mostly support git's extended diff format [*] which
addresses these shortcomings, so this would be a good place to start.
[*] https://github.com/gitster/git/blob/master/Documentation/
diff-generate-patch.txt
Thanks,
Andreas
- [bug-diffutils] diff: support for --no-dereference option, Bruno Haible, 2012/01/07
- Re: [bug-diffutils] diff: support for --no-dereference option, Paul Eggert, 2012/01/07
- Re: [bug-diffutils] diff: support for --no-dereference option, Bruno Haible, 2012/01/07
- Re: [bug-diffutils] diff: support for --no-dereference option, Paul Eggert, 2012/01/08
- Re: [bug-diffutils] diff: support for --no-dereference option, Bruno Haible, 2012/01/08
- Re: [bug-diffutils] diff: support for --no-dereference option, Paul Eggert, 2012/01/08
- Re: [bug-diffutils] --speed-large-files, Bruno Haible, 2012/01/08
- Re: [bug-diffutils] --speed-large-files, Paul Eggert, 2012/01/08
Re: [bug-diffutils] diff: support for --no-dereference option,
Andreas Gruenbacher <=
- Re: [bug-diffutils] diff: support for --no-dereference option, Bruno Haible, 2012/01/07
- Re: [bug-diffutils] diff: support for --no-dereference option, Andreas Gruenbacher, 2012/01/08
- Re: [bug-diffutils] diff: support for --no-dereference option, Bruno Haible, 2012/01/07
- Re: [bug-diffutils] diff: support for --no-dereference option, Andreas Gruenbacher, 2012/01/08
- Re: [bug-diffutils] diff: support for --no-dereference option, Paul Eggert, 2012/01/08
- Re: [bug-diffutils] diff: support for --no-dereference option, Eric Deplagne, 2012/01/09