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

Re: [PATCH] pack-objects: turn off bitmaps when skipping objects

From
Jeff King <peff@peff.net>
Date
Jan 24, 2014, 02:26 UTC
Message-ID
<20140124022621.GB4521@sigill.intra.peff.net>
In-Reply-To
<CAFFjANQ6JkxqSfQaOXF29ETW9ecMXVQTz3x86h_tDjsRdT80HQ@mail.gmail.com>
On Fri, Jan 24, 2014 at 12:56:17AM +0100, Vicent Martí wrote:
Show 10 quoted lines
> On Fri, Jan 24, 2014 at 12:45 AM, Siddharth Agarwal <sid0@fb.com> wrote:
> > Yes, we'd prefer to do that too. How do you actually do this, though? I
> > don't see a way to pass `--honor-pack-keep` (shouldn't I pass in its
> > inverse?) down to `git-pack-objects`.
> 
> We run with this patch in production, it may be of use to you:
> https://gist.github.com/vmg/8589317
> 
> In fact, it may be worth upstreaming too. I'll kindly ask peff to do
> it when he has a moment.

I was actually looking at it earlier when I sent this message. The tricky thing about the patch is that it turns off --honor-pack-keep, but does _not_ teach git-repack to clean up the .keep file.

Which I think is the right and safe thing to do, as otherwise you might blow away a pack with .keep, even though you did not just pack its objects (i.e., because it was written by a fetch or push which did not yet update the refs). So the safe thing is to actually duplicate those objects, leave the .keep pack around, and then assume it will get cleaned up on the next repack.

If you _do_ have a stale .keep file, though, then that stale pack will hang around forever (presumably with its objects duplicated in the "real" pack).

So I think the patch is doing the right thing, but I was still figuring out how to explain it (and I hope I just did). I'll post it with a full commit message tomorrow.

-Peff
Previous: Vicent Martí
Message 27 of 27 in “WIth git-next, writing bitmaps fails when keep files are present”
  1. Siddharth AgarwalJan 23, 2014
  2. Siddharth AgarwalJan 23, 2014
  3. pack-objects: turn off bitmaps when skipping objectsJeff King, Jan 23, 2014
  4. Siddharth AgarwalJan 23, 2014
  5. Siddharth AgarwalJan 23, 2014
  6. Jeff KingJan 24, 2014
  7. Siddharth AgarwalJan 24, 2014
  8. repack: add `repack.honorpackkeep` config varJeff King, Jan 28, 2014
  9. Junio C HamanoJan 28, 2014
  10. Jeff KingFeb 24, 2014
  11. Junio C HamanoFeb 24, 2014
  12. Jeff KingFeb 26, 2014
  13. Junio C HamanoFeb 26, 2014
  14. Jeff KingFeb 27, 2014
  15. Junio C HamanoFeb 27, 2014
  16. Jeff KingFeb 28, 2014
  17. Nasser GrainawiFeb 28, 2014
  18. Jeff KingMar 1, 2014
  19. Shawn PearceMar 3, 2014
  20. Junio C HamanoFeb 28, 2014
  21. Jeff KingMar 1, 2014
  22. Junio C HamanoMar 3, 2014
  23. Jeff KingMar 3, 2014
  24. Junio C HamanoMar 3, 2014
  25. Jeff KingMar 3, 2014
  26. Vicent MartíJan 23, 2014
  27. Jeff KingJan 24, 2014

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.