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

Re: [PATCH 3/4] pack-bitmap.c: support 'tree:0' filtering

From
Junio C Hamano <gitster@pobox.com>
Date
May 5, 2020, 18:20 UTC
Message-ID
<xmqqftceb5wb.fsf@gitster.c.googlers.com>
In-Reply-To
<20200505155951.GA69300@syl.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 8 quoted lines
> I think we need some sort of guard here, since we could receive any
> value of object_type, but you're right that this isn't the right one. It
> should probably be something like:
>
>   if (type < OBJ_COMMIT || type > OBJ_TAG)
>
> to pick out the sentinel values like OBJ_BAD and OBJ_NONE, as well as
> the pack-specific types, like OBJ_OFS_DELTA and so on.

Yeah, it looked strange to start checking for OBJ_BLOB and OBJ_TREE in commits that starts passing these types to the function, while the code in the function was prepared to take any valid type, so using the above condition from the get-go would probably be a lot more sensible.

Previous: Taylor BlauNext: Taylor Blau
Message 9 of 12 in “pack-bitmap: use bitmaps for traversals with '--filter=tree:0'”
  1. 0/4 pack-bitmap: use bitmaps for traversals with '--filter=tree:0'Taylor Blau, May 4, 2020
  2. 1/4 list-objects-filter: treat NULL filter_options as "disabled"Taylor Blau, May 4, 2020
  3. Junio C HamanoMay 5, 2020
  4. 2/4 pack-bitmap.c: make object filtering functions genericTaylor Blau, May 4, 2020
  5. Junio C HamanoMay 5, 2020
  6. 3/4 pack-bitmap.c: support 'tree:0' filteringTaylor Blau, May 4, 2020
  7. Junio C HamanoMay 5, 2020
  8. Taylor BlauMay 5, 2020
  9. Junio C HamanoMay 5, 2020
  10. 4/4 pack-bitmap: pass object filter to fill-in traversalTaylor Blau, May 4, 2020
  11. Junio C HamanoMay 5, 2020
  12. Taylor BlauMay 5, 2020

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.