Re: v2.53.8 !

Tõivo Leedjärv <[email protected]> Mon, 8 Dec 2025 20:29:15 +0100
Newsgroups gmane.network.unison.general
Message-ID <CAALvpZSAYUh1EBaPK-+sDrv=9BAnRETdy3+5LNsoNkivmsyT+A@mail.gmail.com>
On Thu, 4 Dec 2025 at 15:10, Olaf Hering <[email protected]> wrote:
>
> Maybe a short paragraph in the manual about what can be expected from
> this feature should be added. Like does st_mtime or st_mode influence
> the detection, or is it entirely based on the content. And what may happen
> if two identical files in different locations are moved around, like
> does st_mtime and st_mode influence the result of rename().

For now, here's directly from a comment in the source:
Heuristics for detecting moves:
  1. Moved files and directories are detected by matching deletes and
     creations with same contents. A move/rename together with content
     change is not detected.
     For files, contents means file contents. For directories, contents
     means the names and contents of all children recursively.
  2. A delete and a create are matched as a possible move/rename with
     following preference (with best matches first):
     - (for files only) inodes match
     - mtimes and parents are same, names not (a renamed file/dir)
     - mtimes and names are the same, parents not (a moved file/dir)
     - parents are the same, names not (a renamed file/dir)
     - names are the same, parents not (a moved file/dir)
     - mtime are the same, parents and names not (renamed and moved file/dir)
     - nothing is the same (except contents) (renamed and moved file/dir)

It is absolutely possible that a rename/move is detected that doesn't
match the user's actions exactly, but the end result will still be the
same.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].