You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Dmitriy Setrakyan <ds...@apache.org> on 2015/02/10 04:27:05 UTC

patches in GIT

Nice blog on how to create patches in GIT:
https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/

To create a patch:
*git format-patch sprint-1 --stdout > mychanges.patch*

To check a patch (before applying):
*git apply --check mychanges.patch*

To apply a patch:
*git am --signoff < mychanges.patch*

Let's use these commands to attach patches to Jira tickets.

D.

Re: Fwd: patches in GIT

Posted by Konstantin Boudnik <co...@apache.org>.
Perhaps it's not my place to say, but I never seen anything good coming out of
such gigantic patches.

Cos

On Wed, Feb 18, 2015 at 12:51PM, Dmitriy Setrakyan wrote:
> I think some folks have been struggling applying large (over 1MB in size)
> patches. Can you share what kind of issues you were experiencing?
> 
> D.
> 
> On Wed, Feb 18, 2015 at 10:37 AM, Konstantin Boudnik <co...@apache.org> wrote:
> 
> > I think it doesn't matter if you have a script or else, but it all boils
> > down
> > to the format of the patch you'll be attaching to JIRA for further
> > automatic
> > validation. And that's what Dmitriy is suggesting, IMO
> >
> > Cos
> >
> > On Wed, Feb 18, 2015 at 07:03PM, Sergi Vladykin wrote:
> > > I would prefer having scripts which will generate or apply patches
> > > correctly for me.
> > >
> > > Sergi
> > >
> > > 2015-02-10 7:36 GMT+03:00 Konstantin Boudnik <co...@apache.org>:
> > >
> > > > On Mon, Feb 09, 2015 at 07:27PM, Dmitriy Setrakyan wrote:
> > > > > Nice blog on how to create patches in GIT:
> > > > >
> > https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
> > > > >
> > > > > To create a patch:
> > > > > *git format-patch sprint-1 --stdout > mychanges.patch*
> > > >
> > > > You might need to specify the range of the commits you want to
> > generate the
> > > > patches for. E.g.
> > > >     git format-patch sprint-1 HEAD~1
> > > > to produce formatted patch just for single commit
> > > >
> > > > And yes - it's a good idea esp. for automated bot that needs to apply a
> > > > patch
> > > > automatically.
> > > >
> > > > Cos
> > > >
> > > > >
> > > > > To check a patch (before applying):
> > > > > *git apply --check mychanges.patch*
> > > > >
> > > > > To apply a patch:
> > > > > *git am --signoff < mychanges.patch*
> > > > >
> > > > > Let's use these commands to attach patches to Jira tickets.
> > > > >
> > > > > D.
> > > >
> >

Fwd: patches in GIT

Posted by Dmitriy Setrakyan <ds...@apache.org>.
I think some folks have been struggling applying large (over 1MB in size)
patches. Can you share what kind of issues you were experiencing?

D.

On Wed, Feb 18, 2015 at 10:37 AM, Konstantin Boudnik <co...@apache.org> wrote:

> I think it doesn't matter if you have a script or else, but it all boils
> down
> to the format of the patch you'll be attaching to JIRA for further
> automatic
> validation. And that's what Dmitriy is suggesting, IMO
>
> Cos
>
> On Wed, Feb 18, 2015 at 07:03PM, Sergi Vladykin wrote:
> > I would prefer having scripts which will generate or apply patches
> > correctly for me.
> >
> > Sergi
> >
> > 2015-02-10 7:36 GMT+03:00 Konstantin Boudnik <co...@apache.org>:
> >
> > > On Mon, Feb 09, 2015 at 07:27PM, Dmitriy Setrakyan wrote:
> > > > Nice blog on how to create patches in GIT:
> > > >
> https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
> > > >
> > > > To create a patch:
> > > > *git format-patch sprint-1 --stdout > mychanges.patch*
> > >
> > > You might need to specify the range of the commits you want to
> generate the
> > > patches for. E.g.
> > >     git format-patch sprint-1 HEAD~1
> > > to produce formatted patch just for single commit
> > >
> > > And yes - it's a good idea esp. for automated bot that needs to apply a
> > > patch
> > > automatically.
> > >
> > > Cos
> > >
> > > >
> > > > To check a patch (before applying):
> > > > *git apply --check mychanges.patch*
> > > >
> > > > To apply a patch:
> > > > *git am --signoff < mychanges.patch*
> > > >
> > > > Let's use these commands to attach patches to Jira tickets.
> > > >
> > > > D.
> > >
>

Re: patches in GIT

Posted by Konstantin Boudnik <co...@apache.org>.
I think it doesn't matter if you have a script or else, but it all boils down
to the format of the patch you'll be attaching to JIRA for further automatic
validation. And that's what Dmitriy is suggesting, IMO

Cos

On Wed, Feb 18, 2015 at 07:03PM, Sergi Vladykin wrote:
> I would prefer having scripts which will generate or apply patches
> correctly for me.
> 
> Sergi
> 
> 2015-02-10 7:36 GMT+03:00 Konstantin Boudnik <co...@apache.org>:
> 
> > On Mon, Feb 09, 2015 at 07:27PM, Dmitriy Setrakyan wrote:
> > > Nice blog on how to create patches in GIT:
> > > https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
> > >
> > > To create a patch:
> > > *git format-patch sprint-1 --stdout > mychanges.patch*
> >
> > You might need to specify the range of the commits you want to generate the
> > patches for. E.g.
> >     git format-patch sprint-1 HEAD~1
> > to produce formatted patch just for single commit
> >
> > And yes - it's a good idea esp. for automated bot that needs to apply a
> > patch
> > automatically.
> >
> > Cos
> >
> > >
> > > To check a patch (before applying):
> > > *git apply --check mychanges.patch*
> > >
> > > To apply a patch:
> > > *git am --signoff < mychanges.patch*
> > >
> > > Let's use these commands to attach patches to Jira tickets.
> > >
> > > D.
> >

Re: patches in GIT

Posted by Sergi Vladykin <se...@gmail.com>.
I would prefer having scripts which will generate or apply patches
correctly for me.

Sergi

2015-02-10 7:36 GMT+03:00 Konstantin Boudnik <co...@apache.org>:

> On Mon, Feb 09, 2015 at 07:27PM, Dmitriy Setrakyan wrote:
> > Nice blog on how to create patches in GIT:
> > https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
> >
> > To create a patch:
> > *git format-patch sprint-1 --stdout > mychanges.patch*
>
> You might need to specify the range of the commits you want to generate the
> patches for. E.g.
>     git format-patch sprint-1 HEAD~1
> to produce formatted patch just for single commit
>
> And yes - it's a good idea esp. for automated bot that needs to apply a
> patch
> automatically.
>
> Cos
>
> >
> > To check a patch (before applying):
> > *git apply --check mychanges.patch*
> >
> > To apply a patch:
> > *git am --signoff < mychanges.patch*
> >
> > Let's use these commands to attach patches to Jira tickets.
> >
> > D.
>

Re: patches in GIT

Posted by Konstantin Boudnik <co...@apache.org>.
On Mon, Feb 09, 2015 at 07:27PM, Dmitriy Setrakyan wrote:
> Nice blog on how to create patches in GIT:
> https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
> 
> To create a patch:
> *git format-patch sprint-1 --stdout > mychanges.patch*

You might need to specify the range of the commits you want to generate the
patches for. E.g.
    git format-patch sprint-1 HEAD~1
to produce formatted patch just for single commit

And yes - it's a good idea esp. for automated bot that needs to apply a patch
automatically.

Cos

> 
> To check a patch (before applying):
> *git apply --check mychanges.patch*
> 
> To apply a patch:
> *git am --signoff < mychanges.patch*
> 
> Let's use these commands to attach patches to Jira tickets.
> 
> D.

Re: patches in GIT

Posted by Valentin Kulichenko <va...@gmail.com>.
This didn't work for me. Got a lot of "does not exist in index" errors...

On Mon, Feb 9, 2015 at 7:27 PM, Dmitriy Setrakyan <ds...@apache.org>
wrote:

> Nice blog on how to create patches in GIT:
> https://ariejan.net/2009/10/26/how-to-create-and-apply-a-patch-with-git/
>
> To create a patch:
> *git format-patch sprint-1 --stdout > mychanges.patch*
>
> To check a patch (before applying):
> *git apply --check mychanges.patch*
>
> To apply a patch:
> *git am --signoff < mychanges.patch*
>
> Let's use these commands to attach patches to Jira tickets.
>
> D.
>