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

Re: full kernel history, in patchset format

From
Junio C Hamano <junkio@cox.net>
Date
Apr 16, 2005, 18:46 UTC
Message-ID
<7vd5su7e5j.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vmzry7ev5.fsf@assigned-by-dhcp.cox.net>
>>>>> "JCH" == Junio C Hamano <junkio@cox.net> writes:

JCH> I have been cooking this idea before I dove into the merge stuff JCH> and did not have time to implement it myself (Hint Hint), but I JCH> think something along the following lines would work nicely:

It should be fairly obvious from the context what I meant to say, but in case somebody gets confused by my inaccurate description of small details (or, before somebody nitpicks ;-), I'd add some clarifications and corrections.

JCH> * Run diff-tree between neighboring commits [*1*] to find out JCH> the set of blobs that are "related". Extract those related JCH> blobs and run "diff" [*2*] between them to see if it produces JCH> a patch smaller than the whole thing when compressed. If JCH> diff+patch is a win, then we do not have to transmit the blob JCH> that we could reproduce by sending the diff. Note that fact.

I talked only about blobs here, but I really mean all types: commits, trees and blobs here. Nothing prevents us from extracting the raw data for trees and commits and run diff between them. We can use cat-file to do that today.

What we do not have is the reverse of "$ cat-file type >rawdata" (i.e. "$ write-file type <rawdata"), but that is trivial to write. The raw data for related tree objects should delta well. I do not think it is worth the effort to attempt delta for commit objects. Anything that git-archive-tar decides not to send in diff+patch form, be it blob or tree or commit, should be noted here, not just blob as my previous message incorrectly implies.

JCH> Given the above, the operation of git-archive-patch is also JCH> quite obvious. Extract the "diff package" tarball into the JCH> objects/ directory that has (at least) the full Bn, uncompress JCH> the patch file part, and run patch on it.

Of course after you ran patch to reproduce the raw data for the blob or tree, we need the reverse of cat-file to register such data under object/ hierarchy.

Previous: Daniel BarkalowNext: Jan-Benedict Glaw
Message 16 of 42 in “full kernel history, in patchset format”
  1. Ingo MolnarApr 16, 2005
  2. Ingo MolnarApr 16, 2005
  3. David MansfieldApr 16, 2005
  4. Ingo MolnarApr 16, 2005
  5. Francois RomieuApr 16, 2005
  6. Linus TorvaldsApr 16, 2005
  7. Petr BaudisApr 16, 2005
  8. Christopher LiApr 16, 2005
  9. Junio C HamanoApr 16, 2005
  10. Mike TahtApr 16, 2005
  11. Junio C HamanoApr 16, 2005
  12. Christopher LiApr 16, 2005
  13. Junio C HamanoApr 16, 2005
  14. Mike TahtApr 16, 2005
  15. Daniel BarkalowApr 16, 2005
  16. Junio C HamanoApr 16, 2005
  17. Jan-Benedict GlawApr 16, 2005
  18. Thomas GleixnerApr 16, 2005
  19. Petr BaudisApr 16, 2005
  20. Petr BaudisApr 16, 2005
  21. Thomas GleixnerApr 16, 2005
  22. Linus TorvaldsApr 16, 2005
  23. Thomas GleixnerApr 16, 2005
  24. Petr BaudisApr 16, 2005
  25. Junio C HamanoApr 16, 2005
  26. Linus TorvaldsApr 16, 2005
  27. Thomas GleixnerApr 16, 2005
  28. David LangApr 16, 2005
  29. Ingo MolnarApr 16, 2005
  30. David WoodhouseApr 17, 2005
  31. Petr BaudisApr 17, 2005
  32. David WoodhouseApr 18, 2005
  33. Petr BaudisApr 18, 2005
  34. David WoodhouseApr 18, 2005
  35. Petr BaudisApr 18, 2005
  36. David WoodhouseApr 18, 2005
  37. Petr BaudisApr 18, 2005
  38. Linus TorvaldsApr 18, 2005
  39. David WoodhouseApr 18, 2005
  40. Catalin MarinasApr 18, 2005
  41. David MansfieldApr 18, 2005
  42. Catalin MarinasApr 19, 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.