Merge branch 'jc/test-workaround-broken-mv'

Tests that try to corrupt in-repository files in chunked format did
not work well on macOS due to its broken "mv", which has been
worked around.

* jc/test-workaround-broken-mv:
  t/lib-chunk: work around broken "mv" on some vintage of macOS
This commit is contained in:
Junio C Hamano 2024-05-13 10:19:45 -07:00
commit 328f164496

View file

@ -13,5 +13,6 @@ corrupt_chunk_file () {
fn=$1; shift
perl "$TEST_DIRECTORY"/lib-chunk/corrupt-chunk-file.pl \
"$@" <"$fn" >"$fn.tmp" &&
mv "$fn.tmp" "$fn"
# some vintages of macOS 'mv' fails to overwrite a read-only file.
mv -f "$fn.tmp" "$fn"
}