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

Re: [PATCH] git-apply: allow empty patch text

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2021, 06:28 UTC
Message-ID
<xmqq7dkofdgg.fsf@gitster.g>
In-Reply-To
<20210427054632.GA31347@dcvr>
Eric Wong <e@80x24.org> writes:
> I fear this change can cause errors in pipelines to go
> undetected (since "set -o pipefail" is not POSIX).
> In my experience, zero-byte files is also a common failure mode
> for some filesystems, even after fsck marked them as clean.
Thanks for saving me time to say it.

It would be a grave regression to any workflow automation to change the behaviour to silently succeed a non-patch application as a noop. And it does not take filesystem corruption.

Some people seem to gpg sign their patches sent to the list, which is not very useful at this point as I don't bother to collect their public keys anyway, but feeding such a piece of e-mail from GNUS to "git am -s" takes "\M-i r |" prefix instead of the regular "|" to "pipe the message to an external command" to properly get it processed. I was saved by the "empty input is wrong" behaviour a number of times.

Previous: Eric WongNext: Jerry Zhang
Message 3 of 13 in “git-apply: allow empty patch text”
  1. git-apply: allow empty patch textJerry Zhang, Apr 27, 2021
  2. Eric WongApr 27, 2021
  3. Junio C HamanoApr 27, 2021
  4. git-apply: add --allow-empty flagJerry Zhang, Apr 27, 2021
  5. Junio C HamanoApr 28, 2021
  6. Jerry ZhangApr 28, 2021
  7. Ævar Arnfjörð BjarmasonApr 29, 2021
  8. git-apply: add --allow-empty flagJerry Zhang, Dec 11, 2021
  9. Bagas SanjayaDec 11, 2021
  10. git-apply: add --allow-empty flagJerry Zhang, Dec 13, 2021
  11. Junio C HamanoDec 13, 2021
  12. Jerry ZhangDec 13, 2021
  13. Junio C HamanoDec 13, 2021

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.