Re: best way to apply and work on the patches of the pg community - Mailing list pgsql-novice

From Tom Lane
Subject Re: best way to apply and work on the patches of the pg community
Date
Msg-id 3401796.1657902814@sss.pgh.pa.us
Whole thread Raw
In response to best way to apply and work on the patches of the pg community  (mahendrakar s <mahendrakarforpg@gmail.com>)
List pgsql-novice
mahendrakar s <mahendrakarforpg@gmail.com> writes:
> I would like to work on a patch published on hackers community( patch is
> from June, 2021). I cloned postgres code and tried to  apply the patch and
> got errors.

> *patch -p1 < ../0001-auth-generalize-SASL-mechanisms.patch*
> patching file src/backend/libpq/auth-scram.c
> Hunk #1 FAILED at 101.
> Hunk #2 FAILED at 170.
> Hunk #3 FAILED at 199.
> Hunk #4 FAILED at 215.
> Hunk #5 FAILED at 325.

> Can you please let me know what is the recommended way to apply the patches
> for me to begin the work?

"patch -p1" is the way that usually works the best for me.  My guess
here is that the patch in question is out of date and will need manual
adjustment to apply to HEAD.  There have been some pretty significant
changes in that code in the last year, eg 9fd85570d.

Sometimes --ignore-whitespace helps, but I doubt that's the main
problem in this case.

            regards, tom lane



pgsql-novice by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: best way to apply and work on the patches of the pg community
Next
From: Taka Taka
Date:
Subject: Is psqlodbc_13_02 compatible to M365?