kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* How to get patches from e-mail client?
@ 2017-04-17  7:52 Rock Lee
  2017-04-17  8:02 ` Amit Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Rock Lee @ 2017-04-17  7:52 UTC (permalink / raw)
  To: kernelnewbies

Hi:
If I want to get a patch and use "git am" to merge it into my project,
how can I do? I mean I can copy and paste a patch from my e-mail
client, but it is too silly. Is there any way to save a email as a
patch?

-- 
Cheers,
Rock

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

* How to get patches from e-mail client?
  2017-04-17  7:52 How to get patches from e-mail client? Rock Lee
@ 2017-04-17  8:02 ` Amit Kumar
  2017-04-17  8:11   ` Amit Kumar
  2017-04-17  8:16   ` Nicholas Mc Guire
  0 siblings, 2 replies; 7+ messages in thread
From: Amit Kumar @ 2017-04-17  8:02 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Apr 17, 2017 at 03:52:42PM +0800, Rock Lee wrote:
> Hi:
> If I want to get a patch and use "git am" to merge it into my project,
> how can I do? I mean I can copy and paste a patch from my e-mail
> client, but it is too silly. Is there any way to save a email as a
> patch?
Run mutt. Select the patch you want to download using up/down arrow key.
Press s. Delete the mailbox name provide using Backspace key and provide
path on local filesystem e.g. ~/patches/logical_name.patch. It will ask
to save, yes is default, so press Enter.

Now your patch is saved on local filesystem. Create a topic branch e.g.
Your on master,
git checkout -b work

Now you are on topic branch work, run as follows,

git am ~/patches/logical_name.patch

If you are on the right tree then it should apply the patch and commit.
If something goes wrong, please follow the instructions provided by git.

I think this will help.

Regards,
Amit Kumar
> 
> -- 
> Cheers,
> Rock
> 
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* How to get patches from e-mail client?
  2017-04-17  8:02 ` Amit Kumar
@ 2017-04-17  8:11   ` Amit Kumar
  2017-04-17  8:16   ` Nicholas Mc Guire
  1 sibling, 0 replies; 7+ messages in thread
From: Amit Kumar @ 2017-04-17  8:11 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Apr 17, 2017 at 08:02:32AM +0000, Amit Kumar wrote:
> On Mon, Apr 17, 2017 at 03:52:42PM +0800, Rock Lee wrote:
> > Hi:
> > If I want to get a patch and use "git am" to merge it into my project,
> > how can I do? I mean I can copy and paste a patch from my e-mail
> > client, but it is too silly. Is there any way to save a email as a
> > patch?
> Run mutt. Select the patch you want to download using up/down arrow key.
> Press s. Delete the mailbox name provide using Backspace key and provide
> path on local filesystem e.g. ~/patches/logical_name.patch. It will ask
> to save, yes is default, so press Enter.
> 
> Now your patch is saved on local filesystem. Create a topic branch e.g.
> Your on master,
> git checkout -b work
> 
> Now you are on topic branch work, run as follows,
> 
> git am ~/patches/logical_name.patch
> 
> If you are on the right tree then it should apply the patch and commit.
> If something goes wrong, please follow the instructions provided by git.
> 
> I think this will help.
In case if need you setting up mutt,
https://github.com/freeark1/something-to-share
Please follow above URL, there you will find muttrc and msmtprc.
Change settings in both files as it suits you.
Copy muttrc in .mutt directory in $HOME
Copy msmtprc as .msmtprc in $HOME
Install msmtp
NB: ca trust file location for debian based system is different.
If any doubt, please mail.

> 
> Regards,
> Amit Kumar
> > 
> > -- 
> > Cheers,
> > Rock
> > 
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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

* How to get patches from e-mail client?
  2017-04-17  8:02 ` Amit Kumar
  2017-04-17  8:11   ` Amit Kumar
@ 2017-04-17  8:16   ` Nicholas Mc Guire
  2017-04-17  8:25     ` Rock Lee
  2017-04-17  8:26     ` Amit Kumar
  1 sibling, 2 replies; 7+ messages in thread
From: Nicholas Mc Guire @ 2017-04-17  8:16 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Apr 17, 2017 at 08:02:32AM +0000, Amit Kumar wrote:
> On Mon, Apr 17, 2017 at 03:52:42PM +0800, Rock Lee wrote:
> > Hi:
> > If I want to get a patch and use "git am" to merge it into my project,
> > how can I do? I mean I can copy and paste a patch from my e-mail
> > client, but it is too silly. Is there any way to save a email as a
> > patch?
> Run mutt. Select the patch you want to download using up/down arrow key.
> Press s. Delete the mailbox name provide using Backspace key and provide
> path on local filesystem e.g. ~/patches/logical_name.patch. It will ask
> to save, yes is default, so press Enter.
> 
> Now your patch is saved on local filesystem. Create a topic branch e.g.
> Your on master,
> git checkout -b work
> 
> Now you are on topic branch work, run as follows,
> 
> git am ~/patches/logical_name.patch
> 
> If you are on the right tree then it should apply the patch and commit.
> If something goes wrong, please follow the instructions provided by git.
> 
> I think this will help.
>
you can simplify this in mutt by adding:

macro index A '| git am -s'

to your ~/.muttrc 
To apply a patch simply move into the repository you want to 
work on open mutt and hit  A  at that email to pipe it into 
git am -s  and apply it.

thx!
hofrat 

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

* How to get patches from e-mail client?
  2017-04-17  8:16   ` Nicholas Mc Guire
@ 2017-04-17  8:25     ` Rock Lee
  2017-04-17  9:23       ` Amit Kumar
  2017-04-17  8:26     ` Amit Kumar
  1 sibling, 1 reply; 7+ messages in thread
From: Rock Lee @ 2017-04-17  8:25 UTC (permalink / raw)
  To: kernelnewbies

Hi
Thank you guys, it works. But if there are series patches(like
[RFC][PATCH 00/13], [RFC][PATCH 01/13], [RFC][PATCH 02/13]....), how
can I merge them quickly? I mean, I don't want to save and merge these
patches one by one.

On Mon, Apr 17, 2017 at 4:16 PM, Nicholas Mc Guire <der.herr@hofr.at> wrote:
> On Mon, Apr 17, 2017 at 08:02:32AM +0000, Amit Kumar wrote:
>> On Mon, Apr 17, 2017 at 03:52:42PM +0800, Rock Lee wrote:
>> > Hi:
>> > If I want to get a patch and use "git am" to merge it into my project,
>> > how can I do? I mean I can copy and paste a patch from my e-mail
>> > client, but it is too silly. Is there any way to save a email as a
>> > patch?
>> Run mutt. Select the patch you want to download using up/down arrow key.
>> Press s. Delete the mailbox name provide using Backspace key and provide
>> path on local filesystem e.g. ~/patches/logical_name.patch. It will ask
>> to save, yes is default, so press Enter.
>>
>> Now your patch is saved on local filesystem. Create a topic branch e.g.
>> Your on master,
>> git checkout -b work
>>
>> Now you are on topic branch work, run as follows,
>>
>> git am ~/patches/logical_name.patch
>>
>> If you are on the right tree then it should apply the patch and commit.
>> If something goes wrong, please follow the instructions provided by git.
>>
>> I think this will help.
>>
> you can simplify this in mutt by adding:
>
> macro index A '| git am -s'
>
> to your ~/.muttrc
> To apply a patch simply move into the repository you want to
> work on open mutt and hit  A  at that email to pipe it into
> git am -s  and apply it.
>
> thx!
> hofrat



-- 
Cheers,
Rock

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

* How to get patches from e-mail client?
  2017-04-17  8:16   ` Nicholas Mc Guire
  2017-04-17  8:25     ` Rock Lee
@ 2017-04-17  8:26     ` Amit Kumar
  1 sibling, 0 replies; 7+ messages in thread
From: Amit Kumar @ 2017-04-17  8:26 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Apr 17, 2017 at 08:16:20AM +0000, Nicholas Mc Guire wrote:
> On Mon, Apr 17, 2017 at 08:02:32AM +0000, Amit Kumar wrote:
> > On Mon, Apr 17, 2017 at 03:52:42PM +0800, Rock Lee wrote:
> > > Hi:
> > > If I want to get a patch and use "git am" to merge it into my project,
> > > how can I do? I mean I can copy and paste a patch from my e-mail
> > > client, but it is too silly. Is there any way to save a email as a
> > > patch?
> > Run mutt. Select the patch you want to download using up/down arrow key.
> > Press s. Delete the mailbox name provide using Backspace key and provide
> > path on local filesystem e.g. ~/patches/logical_name.patch. It will ask
> > to save, yes is default, so press Enter.
> > 
> > Now your patch is saved on local filesystem. Create a topic branch e.g.
> > Your on master,
> > git checkout -b work
> > 
> > Now you are on topic branch work, run as follows,
> > 
> > git am ~/patches/logical_name.patch
> > 
> > If you are on the right tree then it should apply the patch and commit.
> > If something goes wrong, please follow the instructions provided by git.
> > 
> > I think this will help.
> >
> you can simplify this in mutt by adding:
> 
> macro index A '| git am -s'
> 
> to your ~/.muttrc 
> To apply a patch simply move into the repository you want to 
> work on open mutt and hit  A  at that email to pipe it into 
> git am -s  and apply it.
Something to learn. Thanks.
Regards,
Amit Kumar
> 
> thx!
> hofrat 

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

* How to get patches from e-mail client?
  2017-04-17  8:25     ` Rock Lee
@ 2017-04-17  9:23       ` Amit Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Amit Kumar @ 2017-04-17  9:23 UTC (permalink / raw)
  To: kernelnewbies

On Mon, Apr 17, 2017 at 04:25:50PM +0800, Rock Lee wrote:
> Hi
> Thank you guys, it works. But if there are series patches(like
> [RFC][PATCH 00/13], [RFC][PATCH 01/13], [RFC][PATCH 02/13]....), how
> can I merge them quickly? I mean, I don't want to save and merge these
> patches one by one.
http://flavioleitner.blogspot.in/2011/03/patch-workflow-with-mutt-and-git.html
I think for the time being it is OK.
> 
> On Mon, Apr 17, 2017 at 4:16 PM, Nicholas Mc Guire <der.herr@hofr.at> wrote:
> > On Mon, Apr 17, 2017 at 08:02:32AM +0000, Amit Kumar wrote:
> >> On Mon, Apr 17, 2017 at 03:52:42PM +0800, Rock Lee wrote:
> >> > Hi:
> >> > If I want to get a patch and use "git am" to merge it into my project,
> >> > how can I do? I mean I can copy and paste a patch from my e-mail
> >> > client, but it is too silly. Is there any way to save a email as a
> >> > patch?
> >> Run mutt. Select the patch you want to download using up/down arrow key.
> >> Press s. Delete the mailbox name provide using Backspace key and provide
> >> path on local filesystem e.g. ~/patches/logical_name.patch. It will ask
> >> to save, yes is default, so press Enter.
> >>
> >> Now your patch is saved on local filesystem. Create a topic branch e.g.
> >> Your on master,
> >> git checkout -b work
> >>
> >> Now you are on topic branch work, run as follows,
> >>
> >> git am ~/patches/logical_name.patch
> >>
> >> If you are on the right tree then it should apply the patch and commit.
> >> If something goes wrong, please follow the instructions provided by git.
> >>
> >> I think this will help.
> >>
> > you can simplify this in mutt by adding:
> >
> > macro index A '| git am -s'
> >
> > to your ~/.muttrc
> > To apply a patch simply move into the repository you want to
> > work on open mutt and hit  A  at that email to pipe it into
> > git am -s  and apply it.
> >
> > thx!
> > hofrat
> 
> 
> 
> -- 
> Cheers,
> Rock

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

end of thread, other threads:[~2017-04-17  9:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-17  7:52 How to get patches from e-mail client? Rock Lee
2017-04-17  8:02 ` Amit Kumar
2017-04-17  8:11   ` Amit Kumar
2017-04-17  8:16   ` Nicholas Mc Guire
2017-04-17  8:25     ` Rock Lee
2017-04-17  9:23       ` Amit Kumar
2017-04-17  8:26     ` Amit Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).