Re: Git create patch series for multipe commits.
On Sep 26, 2014 10:31 AM, "Anand Moon" 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@kernelnewbies.org > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Git create patch series for multipe commits.
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... pgpeeHm1zjhx4.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Git create patch series for multipe commits.
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 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Git create patch series for multipe commits.
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 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/* # Send the patch series $ git send-email --to maintai...@domain.org --cc l...@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/* # 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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Git create patch series for multipe commits.
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/* # Send the patch series $ git send-email --to maintai...@domain.org --cc l...@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/* # 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@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Git create patch series for multipe commits.
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 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies