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