git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Brian Foster <brian.foster@innova-card.com>
Cc: Andreas Ericsson <ae@op5.se>, git mailing list <git@vger.kernel.org>
Subject: Re: [Q] merging from one (kernel) stable to another?
Date: Mon, 30 Mar 2009 14:19:08 +0200	[thread overview]
Message-ID: <49D0B8BC.2010405@viscovery.net> (raw)
In-Reply-To: <200903301358.48864.brian.foster@innova-card.com>

Brian Foster schrieb:
> On Monday 30 March 2009 12:38:43 Johannes Sixt wrote:
>> Andreas Ericsson schrieb:
>>> A possibly better approach for you is to "git format-patch"
>>> your own changes and apply them to a clean 2.6.26.8 tree
>>> instead of trying to merge 2.6.26.8 into 2.6.21.
> [ I'm going from .21 to .26.8, so I think you've got that reversed? ]
>> After you have successfully done *that*, you know how the resulting
>> tree must look like, and you give it a tag, say "like-this".
>> If you really want to have a merge, then you can just repeat the
>> merge with your original branch, at which time you will get tons
>> of conflicts.  Now you just 'git checkout like-this -- .' and you
>> have all your conflicts resolved in the way you need them.
> 
> Andreas & Hannes,
> 
>   Thanks for the suggestion.  I'll have to experiment,
>  but off-the-top-of-my-head, I think I do want a merge,
>  so that it's easier to track the history of individual
>  local changes.  Having said that, I'm not entirely sure
>  I follow your suggestions.  What I think you mean is:
> 
>   (1)  Create a patch which is all (local) changes
>          (née diffs) from linux-mips.21 to our.21;
>   (2)  Checkout linux-mips.26.8 (e.g.);
>   (3)  Apply the patch created in (1), above;

format-patch creates a patch series. You apply the whole series, e.g. with
'git am'. But for this workflow you could also just create a single patch
and apply it to linux-mips.26.8, just as you wrote.

The important point is that you forge this tree into the shape that you
finally want to have in the merge (that you will make later). At this
point you only have to deal with conflicts and regressions that arise from
your own changes, which makes your life much easier than if you also had
to deal with conflicts that are outside your own changes.

>   (4)  Tag the result `like-this';
>   (5)  Checkout our.21;  and
>   (6)  Merge with `like-this'.

No, you merge with linux-mips.26.8. This will again give you a lot of
conflicts. But you do

   (7) git checkout like-this -- .

that is, you overwrite the merge result (that has conflicts) with your
known-good tree called "like-this". This resolves all conflicts in the way
that you wanted them.

-- Hannes

  reply	other threads:[~2009-03-30 12:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-30  8:24 [Q] merging from one (kernel) stable to another? Brian Foster
2009-03-30  9:33 ` Andreas Ericsson
2009-03-30 10:38   ` Johannes Sixt
2009-03-30 11:58     ` Brian Foster
2009-03-30 12:19       ` Johannes Sixt [this message]
2009-03-30 12:40         ` Brian Foster
2009-03-30 12:19       ` Andreas Ericsson
2009-03-30 12:51         ` Brian Foster
2009-03-30 13:52           ` Andreas Ericsson
2009-03-30 15:20   ` Ping Yin
2009-03-31  4:20   ` Kris Shannon
2009-03-30 17:31 ` Daniel Barkalow
2009-03-31  7:30   ` Brian Foster
2009-03-30 18:23 ` Uwe Kleine-König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D0B8BC.2010405@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=ae@op5.se \
    --cc=brian.foster@innova-card.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).