We can also have the case where there are links to a file that are not in the tree being transferred. There's nothing we can do about that. Because we rename the destination into place after writing, any hardlinks to the old file are always going to be orphaned. In fact that is almost necessary because otherwise we'd get really confused if we were generating checksums for one name of a file and modifying another.