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

Re: [PATCH 0/3] pack-objects: simplify add_objects_in_unpacked_packs()

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 30, 2021, 06:39 UTC
Message-ID
<xmqqy28j5tct.fsf@gitster.g>
In-Reply-To
<cover.1630291682.git.me@ttaylorr.com>
Taylor Blau <me@ttaylorr.com> writes:
Show 11 quoted lines
> This short series is extracted from mine and Peff's work on cruft packs. These
> three patches focus on cleaning up add_objects_in_unpacked_packs(), which is
> used to implement `git repack -k`.
>
> The pay-off for this clean-up is significant, though: we net -50 lines of code,
> and the result is much more readable, at least in my opinion.
>
> The changes are described in detail in the patch messages, but essentially we
> are replacing a loop over get_all_packs() with for_each_packed_object() after
> adding a couple of new flags necessary to make the switch. And once we are done
> with that, the third patch removes a bit from the object flag allocation table.
A quite pleasant read.  
Each step looked nicely done and well explained.
Will queue.
Thanks.
Show 13 quoted lines
>
> Thanks in advance for your review.
>
> Taylor Blau (3):
>   object-store.h: teach for_each_packed_object to ignore kept packs
>   builtin/pack-objects.c: simplify add_objects_in_unpacked_packs()
>   builtin/pack-objects.c: remove duplicate hash lookup
>
>  builtin/pack-objects.c | 85 ++++++------------------------------------
>  object-store.h         |  6 +++
>  object.h               |  1 -
>  packfile.c             |  6 +++
>  4 files changed, 24 insertions(+), 74 deletions(-)
Previous: Taylor BlauNext: Jeff King
Message 7 of 9 in “pack-objects: simplify add_objects_in_unpacked_packs()”
  1. 0/3 pack-objects: simplify add_objects_in_unpacked_packs()Taylor Blau, Aug 30, 2021
  2. 1/3 object-store.h: teach for_each_packed_object to ignore kept packsTaylor Blau, Aug 30, 2021
  3. 2/3 builtin/pack-objects.c: simplify add_objects_in_unpacked_packs()Taylor Blau, Aug 30, 2021
  4. Jeff KingSep 2, 2021
  5. Taylor BlauSep 3, 2021
  6. 3/3 builtin/pack-objects.c: remove duplicate hash lookupTaylor Blau, Aug 30, 2021
  7. Junio C HamanoAug 30, 2021
  8. Jeff KingAug 30, 2021
  9. Taylor BlauAug 30, 2021

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.