Re: Git diff patch in context diff format

Lists: pgsql-hackers
From: Qi Huang <huangqiyx(at)outlook(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Git diff patch in context diff format
Date: 2012-08-02 09:03:04
Message-ID: BAY002-W47073A16F291158C6E7665B0CB0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi, hackers I was exporting my project to a patch file. As the patch review requires, the patch needs to be in context diff format (http://wiki.postgresql.org/wiki/Reviewing_a_Patch). But the git diff exports in a format similar to unified format. What is everyone doing with patching now? Is there any standard way? Thanks.

Best RegardsHuang Qi VictorComputer Science of National University of Singapore


From: Qi Huang <huangqiyx(at)outlook(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Git diff patch in context diff format
Date: 2012-08-03 06:56:27
Message-ID: BAY002-W38B3F3BA3571A49604D5AEB0CA0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Hi, hackers I was exporting my project to a patch file. As the patch review requires, the patch needs to be in context diff format (http://wiki.postgresql.org/wiki/Reviewing_a_Patch). But the git diff exports in a format similar to unified format. What is everyone doing with patching currently? Is there any standard way? Thanks.

Best RegardsHuang Qi VictorComputer Science of National University of Singapore


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Qi Huang <huangqiyx(at)outlook(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Git diff patch in context diff format
Date: 2012-08-03 08:28:42
Message-ID: CA+Tgmoayu3Mihjc_Oz077ZTD5at+Nd_0UoZY2Tiy9dL-_HPuEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri, Aug 3, 2012 at 2:56 AM, Qi Huang <huangqiyx(at)outlook(dot)com> wrote:
> Hi, hackers
> I was exporting my project to a patch file. As the patch review
> requires, the patch needs to be in context diff format
> (http://wiki.postgresql.org/wiki/Reviewing_a_Patch). But the git diff
> exports in a format similar to unified format. What is everyone doing with
> patching currently? Is there any standard way?

When I want a context diff, I just do:

git diff | filterdiff --format=context

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Qi Huang <huangqiyx(at)outlook(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Git diff patch in context diff format
Date: 2012-08-03 10:12:03
Message-ID: BAY002-W296C654140D83447E90E17B0CA0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Thanks for your suggestion, Robert.I just found this page (http://wiki.postgresql.org/wiki/Working_with_Git#Context_diffs_with_Git), quite useful and powerful.
Best RegardsHuang Qi VictorComputer Science of National University of Singapore

> Date: Fri, 3 Aug 2012 04:28:42 -0400
> Subject: Re: [HACKERS] Git diff patch in context diff format
> From: robertmhaas(at)gmail(dot)com
> To: huangqiyx(at)outlook(dot)com
> CC: pgsql-hackers(at)postgresql(dot)org
>
> On Fri, Aug 3, 2012 at 2:56 AM, Qi Huang <huangqiyx(at)outlook(dot)com> wrote:
> > Hi, hackers
> > I was exporting my project to a patch file. As the patch review
> > requires, the patch needs to be in context diff format
> > (http://wiki.postgresql.org/wiki/Reviewing_a_Patch). But the git diff
> > exports in a format similar to unified format. What is everyone doing with
> > patching currently? Is there any standard way?
>
> When I want a context diff, I just do:
>
> git diff | filterdiff --format=context
>
> --
> Robert Haas
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Qi Huang <huangqiyx(at)outlook(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Git diff patch in context diff format
Date: 2012-08-08 17:29:32
Message-ID: 20120808172932.GA23599@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, Aug 2, 2012 at 05:03:04PM +0800, Qi Huang wrote:
> Hi, hackers
> I was exporting my project to a patch file. As the patch review requires,
> the patch needs to be in context diff format (http://wiki.postgresql.org/wiki/
> Reviewing_a_Patch). But the git diff exports in a format similar to unified
> format. What is everyone doing with patching now? Is there any standard way?

Have you read our wiki about git and diffs?

http://wiki.postgresql.org/wiki/Working_with_Git#Context_diffs_with_Git

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Qi Huang <huangqiyx(at)outlook(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Git diff patch in context diff format
Date: 2012-08-08 19:05:06
Message-ID: 5022B862.2030206@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


On 08/08/2012 01:29 PM, Bruce Momjian wrote:
> On Thu, Aug 2, 2012 at 05:03:04PM +0800, Qi Huang wrote:
>> Hi, hackers
>> I was exporting my project to a patch file. As the patch review requires,
>> the patch needs to be in context diff format (http://wiki.postgresql.org/wiki/
>> Reviewing_a_Patch). But the git diff exports in a format similar to unified
>> format. What is everyone doing with patching now? Is there any standard way?
> Have you read our wiki about git and diffs?
>
> http://wiki.postgresql.org/wiki/Working_with_Git#Context_diffs_with_Git

I must confess that, like Robert, I just use:

git diff | filterdiff --format=context

I tried the git config stuff mentioned on the wiki, and it bit me a few
times, I forget exactly how, and this just works without hassle.

cheers

andrew


From: Qi Huang <huangqiyx(at)outlook(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Git diff patch in context diff format
Date: 2012-08-09 02:44:47
Message-ID: BAY002-W2037E664CC4D2024C29B736B0CC0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> Date: Wed, 8 Aug 2012 15:05:06 -0400
> From: andrew(at)dunslane(dot)net
> To: bruce(at)momjian(dot)us
> CC: huangqiyx(at)outlook(dot)com; pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Git diff patch in context diff format
>
>
> On 08/08/2012 01:29 PM, Bruce Momjian wrote:
> > On Thu, Aug 2, 2012 at 05:03:04PM +0800, Qi Huang wrote:
> >> Hi, hackers
> >> I was exporting my project to a patch file. As the patch review requires,
> >> the patch needs to be in context diff format (http://wiki.postgresql.org/wiki/
> >> Reviewing_a_Patch). But the git diff exports in a format similar to unified
> >> format. What is everyone doing with patching now? Is there any standard way?
> > Have you read our wiki about git and diffs?
> >
> > http://wiki.postgresql.org/wiki/Working_with_Git#Context_diffs_with_Git
>
>
>
> I must confess that, like Robert, I just use:
>
> git diff | filterdiff --format=context
>
> I tried the git config stuff mentioned on the wiki, and it bit me a few
> times, I forget exactly how, and this just works without hassle.
>
> cheers
>
> andrew
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

I'm sorry, but actually this issue has already been resolved. I don't why the system sent another mail... Thanks for your response.

Best RegardsHuang Qi VictorComputer Science of National University of Singapore