git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH 0/2] apply.c: a fix and an enhancement
Date: Fri, 22 Jul 2005 14:18:00 -0400	[thread overview]
Message-ID: <20050722181800.GU20369@mythryan2.michonline.com> (raw)
In-Reply-To: <7vzmsewzik.fsf@assigned-by-dhcp.cox.net>

On Fri, Jul 22, 2005 at 09:56:19AM -0700, Junio C Hamano wrote:
> Now if we had a mechanism to graft a later history which starts
> at 2.6.12-rc2 on top of this earlier history leading up to
> it,...  ;-)

We do - it's not even very hard, we just end up with 2 commits for every
change/merge that's unique to git, until we get to the current head:

Take the last imported commit - we'll call this branch A.
Take the 2.6.12-rc2 initial commit, we'll call this branch B.

This algorithm should stitch things together:

For each commit on branch B
	Copy all commit metadata (author,etc)
	Add a new parent Ai.
	Take the trees from commit B.
	Write a new commit, Ai+1

When we get to HEAD, we replace HEAD with this last commit we have
created, and we now have a nice, parallel commit tree that stitches
everything back together.

Working from the initial import up, you'll need to work in parallel and
handle create some mappings of "old commit" to "new commit" to create
all the merges with the new commit ids, but I think  this should be
pretty straightforward to do.

If this is all integrated, I'd suggest unpacking everything but the
packs that are currently in the main tree, and repacking one very big
pack to get the maximum posible benefit from the deltas.

-- 

Ryan Anderson
  sometimes Pug Majere

  reply	other threads:[~2005-07-22 18:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-22 16:56 [PATCH 0/2] apply.c: a fix and an enhancement Junio C Hamano
2005-07-22 18:18 ` Ryan Anderson [this message]
2005-07-22 19:46   ` Junio C Hamano
2005-07-22 20:16     ` Ryan Anderson
2005-07-22 20:29     ` A Large Angry SCM
2005-07-22 20:43       ` Linus Torvalds
2005-07-22 21:20         ` Junio C Hamano
2005-07-22 21:53           ` Linus Torvalds
2005-07-22 22:42             ` Santi Béjar
2005-07-22 22:55             ` Junio C Hamano
2005-07-22 23:26               ` Linus Torvalds
2005-07-22 23:39                 ` Petr Baudis
2005-07-23  0:20                 ` Junio C Hamano
2005-07-22 23:33             ` Petr Baudis
2005-07-22 23:50               ` Linus Torvalds
2005-07-22 23:59                 ` Petr Baudis

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=20050722181800.GU20369@mythryan2.michonline.com \
    --to=ryan@michonline.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=torvalds@osdl.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).