Skip to content

Commit 0d7b748

Browse files
committed
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
2 parents 7482bc9 + 861dc19 commit 0d7b748

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

t/lib-chunk.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ corrupt_chunk_file () {
1313
fn=$1; shift
1414
perl "$TEST_DIRECTORY"/lib-chunk/corrupt-chunk-file.pl \
1515
"$@" <"$fn" >"$fn.tmp" &&
16-
mv "$fn.tmp" "$fn"
16+
# some vintages of macOS 'mv' fails to overwrite a read-only file.
17+
mv -f "$fn.tmp" "$fn"
1718
}

0 commit comments

Comments
 (0)