diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-13 10:19:45 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-13 10:19:45 -0700 |
| commit | 328f164496ff1d78ec613bdc34ed64339ce6adb7 (patch) | |
| tree | be9973567f3d31700fd06e0d37ab73902872a8ed | |
| parent | e05b9e9a39929657198685d7bd95ca4f6909b5bc (diff) | |
| parent | 861dc19ba852cf668b40d0ef601b44c7c03853a1 (diff) | |
| download | git-328f164496ff1d78ec613bdc34ed64339ce6adb7.tar.gz | |
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
| -rw-r--r-- | t/lib-chunk.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/lib-chunk.sh b/t/lib-chunk.sh index a7cd9c3c6d..9f01df190b 100644 --- a/t/lib-chunk.sh +++ b/t/lib-chunk.sh @@ -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" } |
