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

Re: [PATCH] rev-list: add "--full-objects" flag.

From
Linus Torvalds <torvalds@osdl.org>
Date
Jul 11, 2005, 16:38 UTC
Message-ID
<Pine.LNX.4.58.0507110928070.17536@g5.osdl.org>
In-Reply-To
<m1irzh74m0.fsf@ebiederm.dsl.xmission.com>
On Mon, 11 Jul 2005, Eric W. Biederman wrote:
> 
> I guess I was expecting to pull from one tree into another unrelated
> tree.  Getting a tree with two heads and then be able to merge them
> together.

You can do it, but you have to do it by hand. It's a valid operation, but it's not an operation I want people to do by mistake, so it's not something the trivial helper scripts help with.

The way to do it by hand is to just use something stupid that doesn't understand what it's doing anyway, and just copy the files over. "cp -a" or "rsync" works fine. Then just do "git resolve" by hand. It's not very hard at all, but it's definitely something that should be a special case.

Show 5 quoted lines
> A couple of questions.
> 
> 1) Does git-clone-script when packed copy the entire repository
>    or just take a couple of slices of the tree where you have
>    references?
It only gets the objects needed for the references, nothing more.

So if you only get one branch, it will leave the objects that are specific to other branches alone.

> 2) Is there a way for a pack to create deltas against objects
>    that are not in the tree?  For a dumb repository making incremental
>    changes this is ideal.

A pack can only have deltas against objects in that pack. It caan't even have deltas to other objects in the same tree, it literally is only _within_ a pack. This is so that each pack is totally independent: you can always unpack (and verify) the objects in a pack _without_ having anything else (of course, the end result is often not a full project, and you won't have any references, but at least the _objects_ are valid).

I don't want to have deltas to outside the pack, because while it's obviously very nice from a size packing standpoint, it's totally horrid from an infrastructure standpoint. It would make it possible to have circular dependencies (ie deltas against each other) that could only be resolved by having a third pack (or the unpacked object).

It would also means that you may have to have two packs mapped at the same time to unpack them, which was very much against what I was aiming for: I think that in the long run, for truly huge projects, you'd want to have a history of packs, each maybe a gigabyte in size, and you may be in the situation that you simply cannot have two packs mapped at the same time because you don't have enough virtual memory for it.

So then inter-pack deltas would mean that you'd have to have "partial pack mapping" etc horrid special case logic. Right now, because a pack is always self-sufficient, you know that in order to unpack an object, if you find it in the index file, you will be able to unpack it by just mapping that pack and going off..

So the rule is: don't pack too often. The unpacked objects are actually working really really well as long as you don't have tens of thousands of them. Having a few hundred (or even a few thousand) unpacked objects is not a problem at all. Then you do a "git repack" when it starts getting uncomfortable, and you you continue.

			Linus
Previous: Eric W. BiedermanNext: Eric W. Biederman
Message 31 of 66 in “[ANNOUNCE] Cogito-0.12”
  1. Petr BaudisJul 3, 2005
  2. Brian GerstJul 6, 2005
  3. Petr BaudisJul 7, 2005
  4. Junio C HamanoJul 7, 2005
  5. Linus TorvaldsJul 7, 2005
  6. Junio C HamanoJul 7, 2005
  7. Linus TorvaldsJul 7, 2005
  8. Junio C HamanoJul 7, 2005
  9. Junio C HamanoJul 7, 2005
  10. Eric W. BiedermanJul 7, 2005
  11. Linus TorvaldsJul 7, 2005
  12. Eric W. BiedermanJul 8, 2005
  13. Dumb servers (was: [ANNOUNCE] Cogito-0.12)Kevin Smith, Jul 8, 2005
  14. Linus TorvaldsJul 8, 2005
  15. Petr BaudisJul 7, 2005
  16. Linus TorvaldsJul 7, 2005
  17. Pull efficiently from a dumb git store.Junio C Hamano, Jul 7, 2005
  18. rev-list: add "--objects=self-sufficient" flag.Junio C Hamano, Jul 7, 2005
  19. Linus TorvaldsJul 7, 2005
  20. rev-list: add "--full-objects" flag.Junio C Hamano, Jul 8, 2005
  21. Linus TorvaldsJul 8, 2005
  22. Linus TorvaldsJul 8, 2005
  23. Junio C HamanoJul 8, 2005
  24. Linus TorvaldsJul 8, 2005
  25. Eric W. BiedermanJul 9, 2005
  26. Linus TorvaldsJul 10, 2005
  27. Junio C HamanoJul 10, 2005
  28. Sven VerdoolaegeJul 10, 2005
  29. Linus TorvaldsJul 10, 2005
  30. Eric W. BiedermanJul 11, 2005
  31. Linus TorvaldsJul 11, 2005
  32. Eric W. BiedermanJul 12, 2005
  33. Linus TorvaldsJul 12, 2005
  34. Eric W. BiedermanJul 12, 2005
  35. Linus TorvaldsJul 12, 2005
  36. Eric W. BiedermanJul 12, 2005
  37. Linus TorvaldsJul 12, 2005
  38. Linus TorvaldsJul 11, 2005
  39. Give --full-objects flag to rev-list when preparing a dumb server.Junio C Hamano, Jul 8, 2005
  40. Use --objects=self-sufficient flag to rev-list.Junio C Hamano, Jul 7, 2005
  41. Tony LuckJul 7, 2005
  42. Junio C HamanoJul 7, 2005
  43. Linus TorvaldsJul 7, 2005
  44. Tony LuckJul 8, 2005
  45. Linus TorvaldsJul 8, 2005
  46. Russell KingJul 9, 2005
  47. Russell KingJul 9, 2005
  48. Junio C HamanoJul 9, 2005
  49. Linus TorvaldsJul 10, 2005
  50. Linus TorvaldsJul 10, 2005
  51. Russell KingJul 10, 2005
  52. Junio C HamanoJul 10, 2005
  53. Russell KingJul 10, 2005
  54. Linus TorvaldsJul 10, 2005
  55. Russell KingJul 10, 2005
  56. Linus TorvaldsJul 10, 2005
  57. Russell KingJul 10, 2005
  58. Linus TorvaldsJul 10, 2005
  59. Russell KingJul 10, 2005
  60. Petr BaudisJul 10, 2005
  61. Chris WrightJul 11, 2005
  62. Linus TorvaldsJul 8, 2005
  63. Petr BaudisJul 8, 2005
  64. Daniel BarkalowJul 8, 2005
  65. Chris WrightJul 7, 2005
  66. Check packs and then files.Junio C Hamano, Jul 11, 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.