Re: [PATCH v2 1/1] t1450: use mv -f when overwriting a read only file
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 25, 2026, 16:47 UTC
- Message-ID
- <xmqqv76pybg8.fsf@gitster.g>
- In-Reply-To
- <20261025090242.GA25750@tb-raspi4>
Torsten Bögershausen <tboegi@web.de> writes:
> Thanks as well from my side - I will wait a little while before > sending out v3
Besides typofixes, I wonder if we should tighten the explanation while keeping only the more important bits, perhaps like
t1450: use 'mv -f' when overwriting a read-only file
Test case 38 in t/t1450-fsck.sh ("rev-list --verify-objects with
truncated loose blob") replaces a loose blob with a truncated
version using `mv obj.tmp "$obj"`. Because Git creates loose objects as read-only files, this step
attempts to overwrite a read-only file. When running the test
interactively, older versions of macOS `mv(1)` (prior to 12.3)
will prompt the user for confirmation, causing the test to hang
or fail. Use `mv -f` to force the overwrite and avoid the interactive
prompt.which captures that this is the interactive support of "mv" kicking in, why the files we replace are read-only, and the fact that mv has been fixed since macOS 12.3 (taken from Tuomas's reply).
Thanks.