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

Re: [PATCH] format-patch: notice failure to open cover letter for writing

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 22, 2019, 17:54 UTC
Message-ID
<xmqqo973r9nk.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190222062606.GD10248@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I'd suggest s/F/f/ in the message to match our usual style, though I see
> this code has a lot of capitalized errors already. :)
Yup, I'd prepare a prelim clean-up before this step.
Show 7 quoted lines
>> +test_expect_success 'failure to write cover-letter aborts gracefully' '
>> +	test_when_finished "rmdir 0000-cover-letter.patch" &&
>> +	mkdir 0000-cover-letter.patch &&
>> +	test_must_fail git format-patch --no-renames --cover-letter -1
>> +'
>
> Cute test. :)

Those who can find this "cute" would probably know, but for others, this is a trick to test codepath for "cannot create a file" error without requiring SANITY prerequisite.

Previous: Duy Nguyen
Message 4 of 4 in “format-patch: notice failure to open cover letter for writing”
  1. format-patch: notice failure to open cover letter for writingJunio C Hamano, Feb 21, 2019
  2. Jeff KingFeb 22, 2019
  3. Duy NguyenFeb 22, 2019
  4. Junio C HamanoFeb 22, 2019

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.