Re: [PATCH] git-apply: allow empty patch text
From: Junio C Hamano <hidden>
Date: 2021-04-27 06:28:52
Eric Wong [off-list ref] 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.