git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] apply.c: a fix and an enhancement

From
RARyan Anderson <ryan@michonline.com>
Date
Jul 22, 2005, 18:18 UTC
Message-ID
<20050722181800.GU20369@mythryan2.michonline.com>
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
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 of 16 in “apply.c: a fix and an enhancement”
  1. 0/2 apply.c: a fix and an enhancementJunio C Hamano, Jul 22, 2005
  2. Ryan AndersonJul 22, 2005
  3. Junio C HamanoJul 22, 2005
  4. Ryan AndersonJul 22, 2005
  5. A Large Angry SCMJul 22, 2005
  6. Linus TorvaldsJul 22, 2005
  7. Junio C HamanoJul 22, 2005
  8. Linus TorvaldsJul 22, 2005
  9. Santi BéjarJul 22, 2005
  10. Junio C HamanoJul 22, 2005
  11. Linus TorvaldsJul 22, 2005
  12. Petr BaudisJul 22, 2005
  13. Junio C HamanoJul 23, 2005
  14. Petr BaudisJul 22, 2005
  15. Linus TorvaldsJul 22, 2005
  16. Petr BaudisJul 22, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.