This fixes the following error message:
$ touch a; mv --exchange a b
mv: cannot exchange 'a' and 'b': Unknown error -1
Here is the error message after this commit:
$ touch a; ./src/mv --exchange a b
mv: cannot exchange 'a' and 'b': No such file or directory
* THANKS.in: Add Igor Giamoniano, who reported the bug.
* src/copy.c (copy_internal): Save the EEXIST errno when stat fails,
since renameat would fail for the same reason.
* tests/mv/mv-exchange.sh: Add a few test cases where the bug could be
seen.
* NEWS: Mention the bug fix.
Fixes https://bugs.gnu.org/82186