git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Forward-port a patch using git
@ 2010-12-01 15:37 Spelic
  2010-12-01 18:11 ` Spelic
  0 siblings, 1 reply; 3+ messages in thread
From: Spelic @ 2010-12-01 15:37 UTC (permalink / raw)
  To: git

Hi all
I have patches (xyz.patch files) which apply cleanly to kernel 2.6.36 
and 2.6.36.1 and do not apply cleanly on 2.6.37-rc4 (I mean they do 
apply but with massive offsets...)
I would like to forward-port them to 2.6.37-rc4, i.e. create equivalent 
patch files that would apply cleanly on 2.6.37-rc4 with zero offsets.

I have thought that there should be some git mechanism to confirm that 
such massive offsets which "patch" sees are actually correct and not 
false-positives, and are caused by the commits from 2.6.36 to 
2.6.37-rc4. There should be some mechanism in git to track line shifts 
in source files caused by commits...
After confirming this, Git should create for me equivalent patch files 
that apply cleanly to 2.6.37-rc4 that I can give to other people.

Is it possible? I am unfortunately a newbie with git. Can you help me?

Thank you
PS: I have downloaded the linux-2.6-stable git repository containing all 
needed revisions: v2.6.36, v2.6.36.1 and v2.6.37 .

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

* Re: Forward-port a patch using git
  2010-12-01 15:37 Forward-port a patch using git Spelic
@ 2010-12-01 18:11 ` Spelic
  2010-12-01 18:16   ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Spelic @ 2010-12-01 18:11 UTC (permalink / raw)
  To: git

On 12/01/2010 04:37 PM, Spelic wrote:
> Hi all
> I have patches (xyz.patch files) which apply cleanly to kernel 2.6.36 
> and 2.6.36.1 and do not apply cleanly on 2.6.37-rc4 (I mean they do 
> apply but with massive offsets...)
> I would like to forward-port them to 2.6.37-rc4, i.e. create 
> equivalent patch files that would apply cleanly on 2.6.37-rc4 with 
> zero offsets.
>

I found it myself, sorry for having asked.

It was:

checkout v2.6.36
apply 1 patch
commit
apply 1 patch
commit
...
rebase v2.6.37-rc4
git format-patch -o <destdir> -numpatches

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

* Re: Forward-port a patch using git
  2010-12-01 18:11 ` Spelic
@ 2010-12-01 18:16   ` Jeff King
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff King @ 2010-12-01 18:16 UTC (permalink / raw)
  To: Spelic; +Cc: git

On Wed, Dec 01, 2010 at 07:11:23PM +0100, Spelic wrote:

> I found it myself, sorry for having asked.
> 
> It was:
> 
> checkout v2.6.36

Be aware that checking out the v2.6.36 tag will mean you are not on any
branch. So this will work fine:

> apply 1 patch
> commit
> apply 1 patch
> commit
> ...
> rebase v2.6.37-rc4
> git format-patch -o <destdir> -numpatches

But at the end, you will not have any branch tip pointing to your
rebased work. If all you want are the patches as output, then that's
fine. But you may want to do:

  git checkout -b some-useful-name v2.6.36

as the first step instead, which means you can come back to your rebased
work later as "some-useful-name".

-Peff

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

end of thread, other threads:[~2010-12-01 18:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-01 15:37 Forward-port a patch using git Spelic
2010-12-01 18:11 ` Spelic
2010-12-01 18:16   ` Jeff King

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).