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

Re: fix git-pack-redundant crashing sometimes

From
Junio C Hamano <junkio@cox.net>
Date
Nov 16, 2005, 20:13 UTC
Message-ID
<7vlkzo73m1.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0511151552400.11232@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 8 quoted lines
> On Tue, 15 Nov 2005, Alex Riesen wrote:
>> 
>> Sorry, it doesn't. The code loops here:
>> 
>> 401             /* find the permutations which contain all missing objects */
>> 402             perm_all = perm = get_all_permutations(non_unique);
>
> Looks like the whole thing is exponential.
This reminds me of one thing I have been meaning to remove.

The $GIT_OBJECT_DIRECTORY/info/pack file produced by update-server-info records not just the packs (P lines), but its dependencies (D lines) and top objects (T lines). If there are more than one packs, D lines are meant to help the downloader to figure out what other packs are needed to complete.

"meant to" is the keyword here. The original heuristics was very bad (still correct but way suboptimal) and it has never been updated. I do not use that information myself in http fetch, and I do not think any Porcelain uses it.

Top objects are tags and commits in the pack that are not reachable from any other object in the same pack. This can be useful if you obtain just a packfile -- you can run server-info to produce info/pack file, and resurrect the branch heads and tags by using them --- you would not know what they are called, though. I have been thinking it may be worthwhile to also record bottom objects (B lines, naturally) --- tags and commits in the pack that refer to tags or commits not present in the same pack. This would help commit walkers to decide which pack is more efficient to slurp when faced with multiple choices. If you see a pack all whose bottom objects you have in your repository, fetching that would complete the commit walking, so the choice would become the matter of choosing such a pack among multiple that has smallest number of objects you do not have locally -- you would have the index file for each pack at that point.

Previous: Linus TorvaldsNext: Lukas Sandström
Message 14 of 21 in “fix git-pack-redundant crashing sometimes”
  1. Alex RiesenNov 15, 2005
  2. Timo HirvonenNov 15, 2005
  3. Alex RiesenNov 15, 2005
  4. Linus TorvaldsNov 15, 2005
  5. Lukas SandströmNov 15, 2005
  6. Fix llist_sorted_difference_inplace in git-pack-redundantLukas Sandström, Nov 15, 2005
  7. Alex RiesenNov 15, 2005
  8. Lukas SandströmNov 15, 2005
  9. Alex RiesenNov 15, 2005
  10. Lukas SandströmNov 15, 2005
  11. Alex RiesenNov 16, 2005
  12. Alex RiesenNov 16, 2005
  13. Linus TorvaldsNov 15, 2005
  14. Junio C HamanoNov 16, 2005
  15. Lukas SandströmNov 16, 2005
  16. Lukas SandströmNov 16, 2005
  17. Matthias UrlichsNov 17, 2005
  18. Fredrik KuivinenNov 17, 2005
  19. Make git-pack-redundant non-horribly slow on large sets of packsLukas Sandström, Nov 17, 2005
  20. Fix bug introduced by the latest changes to git-pack-redundantLukas Sandström, Nov 18, 2005
  21. Fix a bug in get_all_permutations.Lukas Sandström, Nov 18, 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.