All of lore.kernel.org
 help / color / mirror / Atom feed
* Git create patch series for multipe commits.
@ 2014-09-26  4:54 Anand Moon
  2014-09-26 14:18 ` Shawn Bohrer
  2014-09-27  8:23 ` Sudip Mukherjee
  0 siblings, 2 replies; 6+ messages in thread
From: Anand Moon @ 2014-09-26  4:54 UTC (permalink / raw)
  To: kernelnewbies

Hi All,

Could somebody provide me steps to create patch series.

How to send version's of these patches.

How to resend these patches.


-Anand Moon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Git create patch series for multipe commits.
  2014-09-26  4:54 Git create patch series for multipe commits Anand Moon
@ 2014-09-26 14:18 ` Shawn Bohrer
  2014-09-26 17:35   ` Anand Moon
  2014-09-27  8:23 ` Sudip Mukherjee
  1 sibling, 1 reply; 6+ messages in thread
From: Shawn Bohrer @ 2014-09-26 14:18 UTC (permalink / raw)
  To: kernelnewbies

On Thu, Sep 25, 2014 at 09:54:25PM -0700, Anand Moon wrote:
> Hi All,
> 
> Could somebody provide me steps to create patch series.
First take a look at:

$ git help format-patch
$ git help send-email

Assuming you have basic familarity with git, the typical workflow
would be something like this.

# create a patch series of the commits in the current branch that are
# not in origin/master
$ mkdir patches
$ git format-patch -o patches/ -M --cover-letter origin/master

# Edit the cover letter to describe your patch series
$ edit patches/0000*

# Send the patch series
$ git send-email --to maintainer at domain.org --cc list at mailinglist.com patches/

> How to send version's of these patches.

# Fix up review comments
$ git commit -m "roll back into patch foo"
$ git rebase -i origin/master
# Re-order and squash the fix with patch foo

> How to resend these patches.

# Make v2 patch series
$ git format-patch -o patches/ -M --cover-letter -v 2 origin/master
# Make new cover-letter with description of changes in v2
$ edit patches/0000*
# Good practice to also mention the v2 change in the patches you fixed
$ edit patches/*foo*.patch

Repeat steps above.

--
Shawn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Git create patch series for multipe commits.
  2014-09-26 14:18 ` Shawn Bohrer
@ 2014-09-26 17:35   ` Anand Moon
  2014-09-26 18:04     ` Shawn Bohrer
  2014-09-26 18:18     ` Valdis.Kletnieks at vt.edu
  0 siblings, 2 replies; 6+ messages in thread
From: Anand Moon @ 2014-09-26 17:35 UTC (permalink / raw)
  To: kernelnewbies

Hi Shawn,

Thanks I will give it a try.

One more question, if the change belong to single file
and we are fixing multiple issue we need to different commit
for each changes. And then club them into patch series.
Am I right.


-Anand Moon

On Friday, September 26, 2014 7:49 PM, Shawn Bohrer <shawn.bohrer@gmail.com> wrote:



On Thu, Sep 25, 2014 at 09:54:25PM -0700, Anand Moon wrote:
> Hi All,
> 
> Could somebody provide me steps to create patch series.
First take a look at:

$ git help format-patch
$ git help send-email

Assuming you have basic familarity with git, the typical workflow
would be something like this.

# create a patch series of the commits in the current branch that are
# not in origin/master
$ mkdir patches
$ git format-patch -o patches/ -M --cover-letter origin/master

# Edit the cover letter to describe your patch series
$ edit patches/0000*

# Send the patch series
$ git send-email --to maintainer at domain.org --cc list at mailinglist.com patches/

> How to send version's of these patches.

# Fix up review comments
$ git commit -m "roll back into patch foo"
$ git rebase -i origin/master
# Re-order and squash the fix with patch foo


> How to resend these patches.

# Make v2 patch series
$ git format-patch -o patches/ -M --cover-letter -v 2 origin/master
# Make new cover-letter with description of changes in v2
$ edit patches/0000*
# Good practice to also mention the v2 change in the patches you fixed
$ edit patches/*foo*.patch

Repeat steps above.

--
Shawn

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Git create patch series for multipe commits.
  2014-09-26 17:35   ` Anand Moon
@ 2014-09-26 18:04     ` Shawn Bohrer
  2014-09-26 18:18     ` Valdis.Kletnieks at vt.edu
  1 sibling, 0 replies; 6+ messages in thread
From: Shawn Bohrer @ 2014-09-26 18:04 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Sep 26, 2014 at 10:35:57AM -0700, Anand Moon wrote:
> Hi Shawn,
> 
> Thanks I will give it a try.
> 
> One more question, if the change belong to single file
> and we are fixing multiple issue we need to different commit
> for each changes. And then club them into patch series.
> Am I right.

I'm not sure if I understand the question or not.  If you need to fix
multiple issues that are all in the same source file but those fixes
are corrections to several different patches in your series, then yes
you should make a single new commit for each fix.  Then with 'git
rebase -i' you can roll each fix back into the correct patch.

If all of the fixes are going to be rolled back into a single patch
then you can simply make a single new commit and roll that back into
the correct patch with 'git rebase -i'.

If you are not familiar with 'git rebase -i' you should read the
"INTERACTIVE MODE" section in the man page 'git help rebase'.  It is an
amazingly powerful tool.

Oh, and I probably should have mentioned it in my first response.  But
if you've never sent a patch before it is a good idea to try sending
it to yourself first.  You can apply the patches to a new branch with
'git am'.

--
Shawn

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Git create patch series for multipe commits.
  2014-09-26 17:35   ` Anand Moon
  2014-09-26 18:04     ` Shawn Bohrer
@ 2014-09-26 18:18     ` Valdis.Kletnieks at vt.edu
  1 sibling, 0 replies; 6+ messages in thread
From: Valdis.Kletnieks at vt.edu @ 2014-09-26 18:18 UTC (permalink / raw)
  To: kernelnewbies

On Fri, 26 Sep 2014 10:35:57 -0700, Anand Moon said:

> One more question, if the change belong to single file
> and we are fixing multiple issue we need to different commit
> for each changes. And then club them into patch series.

Each patch should do exactly one thing. So if you find 3 different issues that
need fixing in foo.c, that should result in 3 commits and 3 patches.  Those 3
may or may not be related enough to require a patch series (where all the
patches should be related).  However, there's a special case where the commits
are close enough together to cause conflicts and/or bisection issues if applied
in the wrong order.  Those should be in a series so they get applied in order
and avoid the conflict/bisection issue.

Hope that helps...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 848 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140926/bf9f9238/attachment.bin 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Git create patch series for multipe commits.
  2014-09-26  4:54 Git create patch series for multipe commits Anand Moon
  2014-09-26 14:18 ` Shawn Bohrer
@ 2014-09-27  8:23 ` Sudip Mukherjee
  1 sibling, 0 replies; 6+ messages in thread
From: Sudip Mukherjee @ 2014-09-27  8:23 UTC (permalink / raw)
  To: kernelnewbies

On Sep 26, 2014 10:31 AM, "Anand Moon" <moon.linux@yahoo.com> wrote:
>
> Hi All,
>
> Could somebody provide me steps to create patch series.
>
the way i do it:
suppose you need to create patch series for your last 5 commits then :
git format-patch -5 -s -n -o patchfolder
patches will be saved in the patchfolder.
to send the series:
git send-mail patchfolder/*

thanks
sudip

> How to send version's of these patches.
>
> How to resend these patches.
>
>
> -Anand Moon
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140927/22c66ee9/attachment.html 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-27  8:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26  4:54 Git create patch series for multipe commits Anand Moon
2014-09-26 14:18 ` Shawn Bohrer
2014-09-26 17:35   ` Anand Moon
2014-09-26 18:04     ` Shawn Bohrer
2014-09-26 18:18     ` Valdis.Kletnieks at vt.edu
2014-09-27  8:23 ` Sudip Mukherjee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.