Re: [PATCH 2/4] remote: print an error if refspec cannot be removed
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 12, 2024, 16:22 UTC
- Message-ID
- <xmqqplp84zbe.fsf@gitster.g>
- In-Reply-To
- <ZuK8yihccDjgQGZV@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> I don't think we want to return the error code from `error()`, do we? > `set_branches()` is wired up as a subcommand, so we'd ultimately do > `exit(-1)` instead of `exit(1)` if we returned the `error()` code here.
Hmph, I thought there was somebody doing !! to canonicalize the return value to exit status in the call chain.
... goes and looks again ...
After finding the subcommand in fn, cmd_remote() ends with
if (fn) {
return !!fn(argc, argv, prefix);
} else {
...
return !!show_all();
}