Re: Context diffs

From: Noah Misch <noah(at)leadboat(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Context diffs
Date: 2021-01-05 02:20:12
Message-ID: 20210105022012.GA2958926@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 05, 2021 at 11:21:07AM +1300, Thomas Munro wrote:
> On Tue, Jan 5, 2021 at 8:07 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > * "git apply" and "git am" can't process context diffs (they throw an
> > error once a context-like section of the diff is hit; simple
> > adding/removing lines in a block works)
> >
> > * the commit-fest doesn't recognized context diff attachments as
> > patches:
> >
> > https://commitfest.postgresql.org/31/2912/
> >
> > * cfbot can't process file renames/add/delete from context diffs
>
> For the record, cfbot just uses plain old GNU patch, because that
> seems to accept nearly everything that anyone posts here (after a step
> that tries to unpack tarballs etc). Several people have suggested I
> change it to use git apply instead (IIRC it works better for patches
> containing binary files such as cryptographic keys?)

It does work better for binary files, though there's little benefit in storing
binary cryptographic keys as opposed to ASCII ones. Unfortunately for the
cfbot, "git apply" forces the equivalent of "patch -F0", so it rejects patches
needlessly. If you do change the cfbot, I recommend having it start with "git
apply -3" (able to succeed when plain "git apply" fails), then fallback to
"patch" when "git apply -3" fails.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2021-01-05 02:33:19 Re: Adding new commitfest entry?
Previous Message Amit Kapila 2021-01-05 02:15:57 Re: fix typo in ReorderBufferProcessTXN