]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - contrib/unbound/libunbound/python/doc/examples/example6-1.py
MFV r316931: 6268 zfs diff confused by moving a file to another directory
authorAndriy Gapon <avg@FreeBSD.org>
Fri, 6 Oct 2017 08:12:13 +0000 (08:12 +0000)
committerAndriy Gapon <avg@FreeBSD.org>
Fri, 6 Oct 2017 08:12:13 +0000 (08:12 +0000)
commit6a880de6e0252d50857d3b165e298b24098bc978
tree983f2579863837ed783443d7bc1a30eb3dafb8bf
parentf079bf7ce3eca371002b93556f5ace26bbb89ca6
parentaa64c9679a7ac8827ac25a9df206548c16f88e0e
MFV r316931: 6268 zfs diff confused by moving a file to another directory

illumos/illumos-gate@aab04418a72c0a29040a5da7eec08efe19dbef04
https://github.com/illumos/illumos-gate/commit/aab04418a72c0a29040a5da7eec08efe19dbef04

https://www.illumos.org/issues/6268
  The zfs diff command presents a description of the changes that have occurred
  to files within a filesystem between two snapshots. If a file is renamed, the
  tool is capable of reporting this, e.g.:
  cd /some/zfs/dataset/subdir
  mv file0 file1
  Will result in a diff record like:
  R        /some/zfs/dataset/subdir/file0  ->  /some/zfs/dataset/subdir/file1
  Unfortunately, it seems that rename detection only uses the base filename to
  determine if a file has been renamed or simply modified. This leads to
  misreporting only the original filename, omitting the more relevant destination
  filename entirely. For example:
  cd /some/zfs/dataset/subdir
  mv file0 ../otherdir/file0
  Will result in a diff entry:
  M        /some/zfs/dataset/subdir/file0
  But it should really emit:
  R        /some/zfs/dataset/subdir/file0  ->  /some/zfs/dataset/otherdir/file0

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Joshua M. Clulow <josh@sysmgr.org>

MFC after: 3 weeks
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c