Re: [BUG] Git 2.42.0-rc2 t1092.57 script error
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 18, 2023, 19:05 UTC
- Message-ID
- <xmqqedk0uq6r.fsf@gitster.g>
- In-Reply-To
- <018601d9d1fc$2049ede0$60ddc9a0$@nexbridge.com>
<rsbecker@nexbridge.com> writes:
Show 10 quoted lines
> I'm getting the following error when running t1092.57 in Git 2.42.0-rc2 > on NonStop ia64: > > + ensure_not_expanded status > test_region[8]: test: argument expected > grep: ensure_full_index: No such file or directory > error: last command exited with $?=1 > not ok 57 - sparse-index is not expanded > > Any suggestions?
Sorry for not coming up with anything concrete.
"ensure_not_expanded status" should be running as its second step
test_region ! index ensure_full_index trace2.txt
Which should do this:
test_region () {
local expect_exit=0
if test "$1" = "!"
then
expect_exit=1
shift
fi grep -e '"region_enter".*"category":"'"$1"'","label":"'"$2"\" "$3"
exitcode=$? if test $exitcode != $expect_exit
thenAs "grep" complains that ensure_full_index is not a file, when the command runs there the file name is "$3".
So it appears to me that the first
test "$1" = "!"
is not firing and failing to set expect_exit to 1 and shift the "!" out of $@. Why? I dunno. Perhaps your shell has quirks around "local"? I dunno.