public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Fedyk <mfedyk@matchmail.com>
To: linux-kernel@vger.kernel.org
Subject: Merging several patches - Tips and Tricks
Date: Wed, 31 Oct 2001 18:26:32 -0800	[thread overview]
Message-ID: <20011031182632.D15598@mikef-linux.matchmail.com> (raw)

Hi,

Recently I was asked how I was able to merge a few moderately large patches
together.

Here's basically what I told him:
############
Here's what I did instead of manually fixing the reject...

You need three kernel trees for this...

2.4.13.vanilla
2.4.13-ac5 (or whatever -ac)
2.4.13-freeswan

ln -s /usr/src/lk2.4/2.4.13-freeswan /usr/src/linux (for freeswan patching
   proceedure)
cd /usr/src/freeswan-1.91
make insert (no problems with 2.4.13)
cd /usr/src/lk2.4/2.4.13freeswan-1.91
patch 2.4.13-ac5 (two rejects)
cd /usr/src/lk2.4

diff -U1 2.4.13.vanilla/Documentation/Configure.help \
  2.4.13-ac5/Documentation/Configure.help > 2.4.13-ac5-Configure.help-U1.patch
  
mv 2.4.13-freeswan/Documentation/Configure.help~ \
  2.4.13-freeswan/Documentation/Configure.help
    
cd 2.4.13-freeswan
patch -p1 < ../2.4.13-ac5-Configure.help-U1.patch
    
(no rejects!)

Rinse and repeat...

Ok, here's the idea.  Normally, diff uses 3 lines of context, this can cause
it to create larger chunks within the patch, and patch won't split these
hunks up to try to get it to apply.  So, if you have smaller chunks and more
of them, it has a much better chance of being able to integrate it...
######

This proceedure is working for me, but I am rather new to the whole process.
Is there another way that doesn't require so many trees, and disk space?

I'd like people to post their tips and tricks, so maybe we can point to it
when the topic comes up again.  Or, maybe a web site would be better...

Note, none of this will help if the actual code will patch together, but
won't work afterwards...

Mike

                 reply	other threads:[~2001-11-01  2:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20011031182632.D15598@mikef-linux.matchmail.com \
    --to=mfedyk@matchmail.com \
    --cc=linux-kernel@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