Thread: [GENERAL] patches

[GENERAL] patches

From
Travis Bauer
Date:
What is the appropriate way to submit a patch to a source file.  From what
I read, I'm supposed to send it here, but do I just attach the changed
file, or do I send in only the changes?

----------------------------------------------------------------
Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
----------------------------------------------------------------


Re: [GENERAL] patches

From
Tom Lane
Date:
Travis Bauer <trbauer@indiana.edu> writes:
> What is the appropriate way to submit a patch to a source file.  From what
> I read, I'm supposed to send it here, but do I just attach the changed
> file, or do I send in only the changes?

Complete files are not good since it's too hard to see what you changed,
and even harder to merge your changes if anyone else has edited the file
since the version you were working from.  Instead, diff -c or diff -u
against the unedited files is the best way.  For example, a u-format
submission would look something like

--- src/backend/utils/adt/arrayfuncs.c.orig    2000/05/30 04:24:50
+++ src/backend/utils/adt/arrayfuncs.c    2000/06/02 15:57:28
@@ -549,11 +549,7 @@
        {
                FILE       *afd;

-#ifndef __CYGWIN32__
-               if ((afd = AllocateFile(accessfile, "r")) == NULL)
-#else
-               if ((afd = AllocateFile(accessfile, "r")) == NULL)
-#endif
+               if ((afd = AllocateFile(accessfile, PG_BINARY_R)) == NULL)
                        elog(ERROR, "unable to open access pattern file");
                *chunkFlag = true;
                retStr = _ChunkArray(*fd, afd, ndim, dim, baseSize, nbytes,


            regards, tom lane

Re: [GENERAL] patches

From
Bruce Momjian
Date:
We need a context diff, diff -c.

> What is the appropriate way to submit a patch to a source file.  From what
> I read, I'm supposed to send it here, but do I just attach the changed
> file, or do I send in only the changes?
>
> ----------------------------------------------------------------
> Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
> ----------------------------------------------------------------
>
>


--
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026