Whether a mode difference between an expected and an observed inode is a reportable fact. A symlink's permission bits are not: POSIX ignores them, Git stores every link as `120000`, and `lstat` reports `0o777` on Linux but `0o755` on macOS, so comparing them reports a phantom change on one platform or the other. A kind change to or from a symlink is still a type change.
(expected: InodeKind, observed: InodeKind)
| 79 | /// macOS, so comparing them reports a phantom change on one platform or the |
| 80 | /// other. A kind change to or from a symlink is still a type change. |
| 81 | pub fn permission_bits_matter(expected: InodeKind, observed: InodeKind) -> bool { |
| 82 | expected != InodeKind::Symlink && observed != InodeKind::Symlink |
| 83 | } |
| 84 | |
| 85 | /// Compare only permissions the current platform can observe. Windows' file |
| 86 | /// metadata exposes a readonly bit, not POSIX executable/group/other bits. |
no outgoing calls
no test coverage detected