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

Re: [PATCH 4/4] Teach "git clone" to pack refs

From
Johan Herland <johan@herland.net>
Date
Jun 15, 2008, 22:03 UTC
Message-ID
<200806160003.06300.johan@herland.net>
In-Reply-To
<20080615175613.GC6127@sigill.intra.peff.net>
On Sunday 15 June 2008, Jeff King wrote:
Show 7 quoted lines
> On Sun, Jun 15, 2008 at 04:06:16PM +0200, Johan Herland wrote:
> > +	pack_refs(PACK_REFS_ALL);
>
> I haven't looked carefully at the pack_refs code, but my understanding
> was that this would pack _all_ refs, including branches. Don't we
> generally try to leave branches unpacked, since they change a lot? IOW,
> shouldn't this just be "pack_refs(0)"?

Yes, for many repos it does not make much sense to pack branches. But in the case where the repo has many inactive branches (I have repos with 1000 branches where at most 5-10 are still active), I'd much rather pack all branches and then later "unpack" the active ones, than write all those "loose" refs as separate files onto the filesystem (e.g. in CygWin *shudder*). In any case, the user normally does not work actively on hundreds of branches, so the overhead of "unpacking" active branches should be fairly negligible in any case.

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Jeff KingNext: Jeff King
Message 12 of 13 in “Teach "git clone" to pack refs”
  1. 0/4 Teach "git clone" to pack refsJohan Herland, Jun 15, 2008
  2. 1/4 Incorporate fetched packs in future object traversalJohan Herland, Jun 15, 2008
  3. 2/4 Move pack_refs() and friends into libgitJohan Herland, Jun 15, 2008
  4. Jeff KingJun 15, 2008
  5. 2/4 Move pack_refs() and friends into libgitJohan Herland, Jun 15, 2008
  6. 3/4 Prepare testsuite for a "git clone" that packs refsJohan Herland, Jun 15, 2008
  7. Jeff KingJun 15, 2008
  8. Jakub NarebskiJun 15, 2008
  9. 3/4 Prepare testsuite for a "git clone" that packs refsJohan Herland, Jun 15, 2008
  10. 4/4 Teach "git clone" to pack refsJohan Herland, Jun 15, 2008
  11. Jeff KingJun 15, 2008
  12. Johan HerlandJun 15, 2008
  13. Jeff KingJun 16, 2008

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.