diff options
| author | Junio C Hamano <gitster@pobox.com> | 2024-05-31 15:28:18 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-31 15:28:18 -0700 |
| commit | 0d7b7484c9b3e110587e9bdc942d0bff6a925c25 (patch) | |
| tree | 6df3bf619273806959e1b2f991f0a7b5755f0372 | |
| parent | 7482bc956c6d7c77194d7beaae856961f6d23153 (diff) | |
| parent | 861dc19ba852cf668b40d0ef601b44c7c03853a1 (diff) | |
| download | git-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.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" } |
