Обсуждение: [GENERAL] patches

Поиск
Список
Период
Сортировка

[GENERAL] patches

От
Travis Bauer
Дата:
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

От
Tom Lane
Дата:
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

От
Bruce Momjian
Дата:
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