aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-31 15:28:18 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-31 15:28:18 -0700
commit0d7b7484c9b3e110587e9bdc942d0bff6a925c25 (patch)
tree6df3bf619273806959e1b2f991f0a7b5755f0372
parent7482bc956c6d7c77194d7beaae856961f6d23153 (diff)
parent861dc19ba852cf668b40d0ef601b44c7c03853a1 (diff)
downloadgit-0d7b7484c9b3e110587e9bdc942d0bff6a925c25.tar.xz
Merge branch 'jc/test-workaround-broken-mv' into maint-2.45
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"
}