Thread: How to send patch with so many files changes?
Hi hackers,
I am new in contributing to postgres. I have a doubt regarding if we want to send a patch which has an extension and also has changes in pg source also,what's the way to do it?
It seems odd right ? we are doing extension then ,then why changes in pg?
This is the 1st version of the idea,if it goes well 🤞 we can move the changes from extension to pg.
It seems odd right ? we are doing extension then ,then why changes in pg?
This is the 1st version of the idea,if it goes well 🤞 we can move the changes from extension to pg.
regards,
Tony Wayne
On Wed, Sep 25, 2024 at 6:02 AM Tony Wayne <anonymouslydark3@gmail.com> wrote:
I am new in contributing to postgres. I have a doubt regarding if we want to send a patch which has an extension and also has changes in pg source also,what's the way to do it?
is git diff enough?
On Tue, Sep 24, 2024 at 5:32 PM Tony Wayne <anonymouslydark3@gmail.com> wrote:
This is the 1st version of the idea,if it goes well 🤞 we can move the changes from extension to pg.
If you are saying you are planning to add something to the contrib directly then you should just post the patch(es) that do it. Your ability to make it digestible will highly influence whether anyone is willing to review it.
If this isn't intended for core or contrib you are not in the correct place. If you wish to share an external extension you are publishing the -general channel would be the place to discuss such things.
David J.
On Tue, Sep 24, 2024 at 5:37 PM Tony Wayne <anonymouslydark3@gmail.com> wrote:
On Wed, Sep 25, 2024 at 6:02 AM Tony Wayne <anonymouslydark3@gmail.com> wrote:I am new in contributing to postgres. I have a doubt regarding if we want to send a patch which has an extension and also has changes in pg source also,what's the way to do it?is git diff enough?
Usually you'd want to use format-patch so your commit message(s) make it into the artifact. Especially for something complex/large.
David J.
These changes are for core ,I think it would be better to either move whole changes to core or contrib as an extension.
On Wed, Sep 25, 2024 at 6:09 AM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Tue, Sep 24, 2024 at 5:37 PM Tony Wayne <anonymouslydark3@gmail.com> wrote:On Wed, Sep 25, 2024 at 6:02 AM Tony Wayne <anonymouslydark3@gmail.com> wrote:I am new in contributing to postgres. I have a doubt regarding if we want to send a patch which has an extension and also has changes in pg source also,what's the way to do it?is git diff enough?Usually you'd want to use format-patch so your commit message(s) make it into the artifact. Especially for something complex/large.David J.
On Wed, Sep 25, 2024 at 6:36 AM Michael Paquier <michael@paquier.xyz> wrote:
On Wed, Sep 25, 2024 at 06:19:39AM +0530, Tony Wayne wrote:
> These changes are for core ,I think it would be better to either move whole
> changes to core or contrib as an extension.
Please avoid top-posting. The community mailing lists use
bottom-posting, to ease discussions. See:
https://en.wikipedia.org/wiki/Posting_style#Bottom-posting
Thanks for the feedback.
> On Wed, Sep 25, 2024 at 6:09 AM David G. Johnston <
> david.g.johnston@gmail.com> wrote:
>> Usually you'd want to use format-patch so your commit message(s) make it
>> into the artifact. Especially for something complex/large.
The community wiki has some guidelines about all that:
https://wiki.postgresql.org/wiki/Submitting_a_Patch
In my experience, it is much easier to sell a feature to the community
if a patch is organized into independent useful pieces with
refactoring pieces presented on top of the actual feature. In order
to achieve that `git format-patch` is essential because it is possible
to present a patch set organizing your ideas so as others need to
spend less time trying to figure out what a patch set is doing when
doing a review. format-patch with `git am` is also quite good to
track the addition of new files or the removal of old files. Writing
your ideas in the commit logs can also bring a lot of insight for
anybody reading your patches.
For simpler and localized changes, using something like git diff would
be also OK that can be applied with a simple `patch` command can also
be fine. I've done plenty of work with patches sent to the lists this
way for bug fixes. Of course this is case-by-case, for rather complex
bug fixes format-patch can still be a huge gain of time when reading
somebody else's ideas on a specific matter.
--
Michael
Thanks, I got it 👍.