From: "Kyle Moffett" <kyle@moffetthome.net>
To: "J.R. Mauro" <jrm8005@gmail.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Greg KH" <greg@kroah.com>,
linux-kernel@vger.kernel.org
Subject: Re: merging other repos into linux-2.6
Date: Fri, 31 Oct 2008 00:08:54 -0400 [thread overview]
Message-ID: <f73f7ab80810302108n37f72994qfc5d7d83b64e290@mail.gmail.com> (raw)
In-Reply-To: <3aaafc130810301938k4ee654d6sf7de1fff5d9c9fc3@mail.gmail.com>
On Thu, Oct 30, 2008 at 10:38 PM, J.R. Mauro <jrm8005@gmail.com> wrote:
> I agree. The only viable automated approach would be something akin to
> git-submodule but with the ability to integrate the submodule'd
> project upon import in such a way that things like bisection would
> follow the main project's ancestry and ignore the submodule's. But
> that's not possible right now and probably won't be in the foreseeable
> future.
Here's one relatively easy solution:
(1) Fetch the to-be-merged branch of the "child" project into a
repository with the parent project ($KIDBRANCH)
(2) Find a branch on which you are going to rebase the child
project's history ($BASEBRANCH)
(3) Determine a directory into which you are going to put the child
project's history ($SUBDIR)
(4) Identify the first revision of the child project by looking at
the last (first-in-time) entry in "git log" of that branch.
($KIDSTART)
(5) Graft the kid's history onto the parent's history at that point:
echo "$KIDSTART $(git rev-parse --verify $BASEBRANCH)" >.git/info/grafts
(6) Rewrite the kid's history as a subdir of that version of the parent:
git filter-branch --index-filter 'git read-tree master && git
read-tree --prefix=drivers/newkiddriver/ "$GIT_COMMIT"' --
"$BASEBRANCH..$KIDBRANCH"
Now the history of $KIDBRANCH will appear to be a series of commits
which add files in $SUBDIR of the parent project, without any changes
at all to the parent project's tree. You can then do a merge of what
appears to be a normal development branch into the main repository.
Since none of the files are even remotely referenced, there can be no
possible build failures (hence bisection is not broken). You may then
add commits which add Kconfig options and Makefile references and
happily develop away.
Cheers,
Kyle Moffett
next prev parent reply other threads:[~2008-10-31 4:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 5:49 Greg KH
2008-10-30 17:17 ` Stefan Richter
2008-10-30 19:04 ` Linus Torvalds
2008-10-30 21:52 ` Dave Kleikamp
2008-10-30 23:19 ` Linus Torvalds
2008-10-30 21:57 ` Greg KH
2008-10-30 23:28 ` Linus Torvalds
2008-10-31 3:13 ` Greg KH
2008-10-31 1:34 ` J.R. Mauro
2008-10-31 1:47 ` Linus Torvalds
2008-10-31 2:38 ` J.R. Mauro
2008-10-31 3:31 ` Theodore Tso
2008-10-31 4:08 ` Kyle Moffett [this message]
2008-10-31 12:57 ` J.R. Mauro
2008-10-31 14:22 ` Kyle Moffett
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=f73f7ab80810302108n37f72994qfc5d7d83b64e290@mail.gmail.com \
--to=kyle@moffetthome.net \
--cc=greg@kroah.com \
--cc=jrm8005@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®