All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about applying a kernel patch with "git am" received from a mailing list
@ 2012-11-20 17:24 Kevin Wilson
  2012-11-20 17:39 ` Josh Cartwright
  2012-11-21 18:56 ` Jonathan Neuschäfer
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Wilson @ 2012-11-20 17:24 UTC (permalink / raw)
  To: kernelnewbies

Hi,
I am following some kernel mailing lists (netdev and others).
I want to be able to save recent patches and to apply the against a git tree.

I tried using MUTT client for this. I save the patch (which is almost
always inline).

Then I run
git apply --check patchName
and
git apply  patchName
and it applies cleanly.

But if I try:
git am  patchName

It gives
"Patch format detection failed."

Any recommendation what to do to apply a patch
with "git am"?

could it be that using thunderbird as an email client for this task is better?

rgs,
Kevin

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

* Question about applying a kernel patch with "git am" received from a mailing list
  2012-11-20 17:24 Question about applying a kernel patch with "git am" received from a mailing list Kevin Wilson
@ 2012-11-20 17:39 ` Josh Cartwright
  2012-11-20 17:53   ` Kevin Wilson
  2012-11-21 18:56 ` Jonathan Neuschäfer
  1 sibling, 1 reply; 6+ messages in thread
From: Josh Cartwright @ 2012-11-20 17:39 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote:
> Hi,
> I am following some kernel mailing lists (netdev and others).
> I want to be able to save recent patches and to apply the against a git tree.
> 
> I tried using MUTT client for this. I save the patch (which is almost
> always inline).
> 
> Then I run
> git apply --check patchName
> and
> git apply  patchName
> and it applies cleanly.
> 
> But if I try:
> git am  patchName
> 
> It gives
> "Patch format detection failed."
> 
> Any recommendation what to do to apply a patch
> with "git am"?

Kevin-

Just use mutt's 'pipe-message' feature, which is bound to '|' by
default.  Pipe the message directly to 'git am'.

   Josh

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

* Question about applying a kernel patch with "git am" received from a mailing list
  2012-11-20 17:39 ` Josh Cartwright
@ 2012-11-20 17:53   ` Kevin Wilson
  2012-11-20 18:02     ` Josh Cartwright
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Wilson @ 2012-11-20 17:53 UTC (permalink / raw)
  To: kernelnewbies

Hi,
Thanks for the quick response!
I press "|" , I want to pipe to the git tree (which is
/work/src/net-next). How do I tell pipe that the path of git tree is
there?

rgs
Kevin

On Tue, Nov 20, 2012 at 7:39 PM, Josh Cartwright <joshc@eso.teric.us> wrote:
> On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote:
>> Hi,
>> I am following some kernel mailing lists (netdev and others).
>> I want to be able to save recent patches and to apply the against a git tree.
>>
>> I tried using MUTT client for this. I save the patch (which is almost
>> always inline).
>>
>> Then I run
>> git apply --check patchName
>> and
>> git apply  patchName
>> and it applies cleanly.
>>
>> But if I try:
>> git am  patchName
>>
>> It gives
>> "Patch format detection failed."
>>
>> Any recommendation what to do to apply a patch
>> with "git am"?
>
> Kevin-
>
> Just use mutt's 'pipe-message' feature, which is bound to '|' by
> default.  Pipe the message directly to 'git am'.
>
>    Josh

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

* Question about applying a kernel patch with "git am" received from a mailing list
  2012-11-20 17:53   ` Kevin Wilson
@ 2012-11-20 18:02     ` Josh Cartwright
  2012-11-21 14:05       ` Kevin Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Josh Cartwright @ 2012-11-20 18:02 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 20, 2012 at 07:53:57PM +0200, Kevin Wilson wrote:
> On Tue, Nov 20, 2012 at 7:39 PM, Josh Cartwright <joshc@eso.teric.us> wrote:
> > On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote:
> > > Hi,
> > > I am following some kernel mailing lists (netdev and others).
> > > I want to be able to save recent patches and to apply the against a git tree.
> > >
> > > I tried using MUTT client for this. I save the patch (which is almost
> > > always inline).
> > >
> > > Then I run
> > > git apply --check patchName
> > > and
> > > git apply  patchName
> > > and it applies cleanly.
> > >
> > > But if I try:
> > > git am  patchName
> > >
> > > It gives
> > > "Patch format detection failed."
> > >
> > > Any recommendation what to do to apply a patch
> > > with "git am"?
> >
> > Kevin-
> >
> > Just use mutt's 'pipe-message' feature, which is bound to '|' by
> > default.  Pipe the message directly to 'git am'.
>
> Hi,
> Thanks for the quick response!  I press "|" , I want to pipe to the
> git tree (which is /work/src/net-next). How do I tell pipe that the
> path of git tree is there?

Simple!

Instead of piping to 'git am', pipe to 'cd /work/src/net-next && git am'.

Alternatively, run mutt from your source tree.

   Josh

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

* Question about applying a kernel patch with "git am" received from a mailing list
  2012-11-20 18:02     ` Josh Cartwright
@ 2012-11-21 14:05       ` Kevin Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Wilson @ 2012-11-21 14:05 UTC (permalink / raw)
  To: kernelnewbies

Hi, Josh,

Thanks again!

While your suggestion works, it has some disadvantages; maybe
you/someone can advice:

1) In the case when I want to apply a series of patches, let's say a
patchset of 10 patches, does this mean that I should run
"pipe git am" on each of them ?

2) Even this is the case; suppose I apply 10 patches. Then I
make some tests, and want to return to the original tree,  (by git
reset --hard) and after a day or say again apply these patches (or
some of them) I should go into mutt, browse the list of messages and
find them,  and then apply them, etc...


Is there no way to save patches and then "git am" the patches
without these error ? I heard that mutt is very popular
for working with patches. Such a feature seems natural to me.

rgs
Kevin

On Tue, Nov 20, 2012 at 8:02 PM, Josh Cartwright <joshc@eso.teric.us> wrote:
> On Tue, Nov 20, 2012 at 07:53:57PM +0200, Kevin Wilson wrote:
>> On Tue, Nov 20, 2012 at 7:39 PM, Josh Cartwright <joshc@eso.teric.us> wrote:
>> > On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote:
>> > > Hi,
>> > > I am following some kernel mailing lists (netdev and others).
>> > > I want to be able to save recent patches and to apply the against a git tree.
>> > >
>> > > I tried using MUTT client for this. I save the patch (which is almost
>> > > always inline).
>> > >
>> > > Then I run
>> > > git apply --check patchName
>> > > and
>> > > git apply  patchName
>> > > and it applies cleanly.
>> > >
>> > > But if I try:
>> > > git am  patchName
>> > >
>> > > It gives
>> > > "Patch format detection failed."
>> > >
>> > > Any recommendation what to do to apply a patch
>> > > with "git am"?
>> >
>> > Kevin-
>> >
>> > Just use mutt's 'pipe-message' feature, which is bound to '|' by
>> > default.  Pipe the message directly to 'git am'.
>>
>> Hi,
>> Thanks for the quick response!  I press "|" , I want to pipe to the
>> git tree (which is /work/src/net-next). How do I tell pipe that the
>> path of git tree is there?
>
> Simple!
>
> Instead of piping to 'git am', pipe to 'cd /work/src/net-next && git am'.
>
> Alternatively, run mutt from your source tree.
>
>    Josh

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

* Question about applying a kernel patch with "git am" received from a mailing list
  2012-11-20 17:24 Question about applying a kernel patch with "git am" received from a mailing list Kevin Wilson
  2012-11-20 17:39 ` Josh Cartwright
@ 2012-11-21 18:56 ` Jonathan Neuschäfer
  1 sibling, 0 replies; 6+ messages in thread
From: Jonathan Neuschäfer @ 2012-11-21 18:56 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Nov 20, 2012 at 07:24:28PM +0200, Kevin Wilson wrote:
> Hi,
> I am following some kernel mailing lists (netdev and others).
> I want to be able to save recent patches and to apply the against a git tree.
> 
> I tried using MUTT client for this. I save the patch (which is almost
> always inline).

Try the following, it worked for me:
 - "tag" the patchset and "tag-save" or "tag-copy" it into one file
 - run: git am patchset.name

BTW, everyone working with git should try StGit ("stacked git"), it's
quite a useful tool.

HTH,
Jonathan Neusch?fer

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

end of thread, other threads:[~2012-11-21 18:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-20 17:24 Question about applying a kernel patch with "git am" received from a mailing list Kevin Wilson
2012-11-20 17:39 ` Josh Cartwright
2012-11-20 17:53   ` Kevin Wilson
2012-11-20 18:02     ` Josh Cartwright
2012-11-21 14:05       ` Kevin Wilson
2012-11-21 18:56 ` Jonathan Neuschäfer

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.