Re: [PATCH v2 1/1] maintenance: fix SEGFAULT when no repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 24, 2020, 14:14 UTC
- Message-ID
- <xmqqczyz2sw0.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAP8UFD2mrgympQ0tbhty+cgZ7ow_+bsxE8gm1Wsn_mo+a6sq2Q@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 5 quoted lines
>> I wonder if it is a good direction to go to run the tests with the >> "set -e" option on, and accept its peculiarities. > > Another solution could be to define a command_not_found_handle > function as bourne shells should call that.
I am reasonably sure it is bash-ism and a rather stale stackexchange question seems to say that command_not_found_handler function (note the 'r' at the end) is its equivalent in zsh.
Having said that, we already have other bash-specific debugging support in our test harness, and it may not be a bad idea to use the facility to catch these bugs, even if the support is available only when running the tests under bash and no other shell.
> By the way it's not the first time we get such an issue, see: > > https://lore.kernel.org/git/CAP8UFD15+p+xKwJ=B9WVsrc+2TvLHKmu78SBCLUFZVSYoTtbbg@mail.gmail.com/
Excellent memory. Thanks.