git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] mailsplit.c: remove dead code

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Aug 12, 2014, 21:56 UTC
Message-ID
<vpqd2c5z81w.fsf@anie.imag.fr>
In-Reply-To
<xmqqvbpx4cd6.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 18 quoted lines
> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>
>> Stefan Beller <stefanbeller@gmail.com> writes:
>>
>>> +	if (is_bare && !allow_bare) {
>>> +		unlink(name);
>>> +		fprintf(stderr, "corrupt mailbox\n");
>>> +		exit(1);
>>> +	}
>>
>> Not directly related to your patch, but shouldn't this be using
>>
>> die(_("corrupt mailbox"));
>>
>> instead?
>
> Doesn't the exit status of mailsplit matter to its existing
> invokers?

Not within Git. I doubt anybody checks if the exit status is 1 and relies on that for corrupt mailboxes, but OTOH, changing the code may not be worth the trouble.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Jonathan Nieder
Message 7 of 9 in “mailsplit.c: remove dead code”
  1. mailsplit.c: remove dead codeStefan Beller, Aug 11, 2014
  2. René ScharfeAug 12, 2014
  3. mailsplit.c: remove dead codeStefan Beller, Aug 12, 2014
  4. Matthieu MoyAug 12, 2014
  5. Junio C HamanoAug 12, 2014
  6. Junio C HamanoAug 12, 2014
  7. Matthieu MoyAug 12, 2014
  8. Jonathan NiederAug 12, 2014
  9. Jeff KingAug 17, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.