+rm -rf "$todir"
+
+xset user.nice 'this is nice, but different' file1
+
+xls $dirs $files >"$scratchdir/xattrs.txt"
+
+checkit "$RSYNC -aiX --fake-super --link-dest=../chk . ../to" "$chkdir" "$todir"
+
+cd "$todir"
+xls $dirs $files | diff $diffopt "$scratchdir/xattrs.txt" -
+
+sed -n -e '/^[^ ][^ ]* *[^ ][^ ]* *[^ ][^ ]* *1 /p' "$scratchdir/ls-to" >"$scratchdir/ls-diff-all"
+fgrep -v './file1' "$scratchdir/ls-diff-all" >"$scratchdir/ls-diff" || :
+if [ -s "$scratchdir/ls-diff" ]; then
+ echo "Missing hard links on:"
+ cat "$scratchdir/ls-diff"
+ exit 1
+fi
+if [ ! -s "$scratchdir/ls-diff-all" ]; then
+ echo "Too many hard links on file1!"
+ exit 1
+fi
+
+cd "$chkdir"
+chmod go-rwx . $dirs $files
+