let's not complain about harmless patch-apply failures

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Sergei Kornilov <sk(at)zsrv(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: let's not complain about harmless patch-apply failures
Date: 2018-01-16 16:56:55
Message-ID: CA+TgmobGeHX+G2q25gW7fzzzExt1jXv_xhG23E56okQpVa9E2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 16, 2018 at 4:04 AM, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> At Mon, 15 Jan 2018 21:45:34 -0500, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote in <26718(dot)1516070734(at)sss(dot)pgh(dot)pa(dot)us>
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> > Since the "Stripping trailing CRs from patch" message is totally
>> > harmless, I'm not sure why you should need to devote any effort to
>> > avoiding it. Anyone who gets it should just ignore it.
>
> I know that and totally agree to Robert but still I wonder why
> (and am annoyed by) I sometimes receive such complain or even an
> accusation that I sent an out-of-the-convention patch and I was
> afraid that it is not actually common.

I've seen that before as well.

I have also noticed people complaining about patches that apply "with
offsets", which also seems like needless nitpicking. If the offsets
are large and the patch has been sitting around for a long time,
there's a small chance it could be applying to the wrong place, but
that is extremely rare. Most patches have small offsets, just a few
lines, and there is no problem. Complaining about the offsets, on the
other hand, is unhelpful: it not only forces the patch author to
update the patch for no good reason, but it clutters the mailing list
with useless traffic that everyone else has to ignore.

I think we should have a firm policy that if patch -p1 can apply your
patch, your patch is sufficiently well-formatted. If someone wants
the result as a context diff, a unified diff, with one kind of line
endings vs. another, or whatever, they can apply the patch locally and
use whatever tools they like to get a diff in the format they prefer.

When posting large patch stacks, 'git format-patch' is nice because it
lets you give a sequence number and a commit message to each patch in
a sensible way. I recommend it, but I don't think we should insist on
it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2018-01-16 17:10:12 Re: let's not complain about harmless patch-apply failures
Previous Message Andres Freund 2018-01-16 16:50:24 Re: [HACKERS] Deadlock in XLogInsert at AIX