aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-13 10:19:45 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-13 10:19:45 -0700
commit328f164496ff1d78ec613bdc34ed64339ce6adb7 (patch)
treebe9973567f3d31700fd06e0d37ab73902872a8ed
parente05b9e9a39929657198685d7bd95ca4f6909b5bc (diff)
parent861dc19ba852cf668b40d0ef601b44c7c03853a1 (diff)
downloadgit-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.sh3
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"
}