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

Re: [PATCH v2 4/6] list-objects: filter objects in traverse_commit_list

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Nov 6, 2017, 17:51 UTC
Message-ID
<68f3c18f-8bee-dbb7-26f3-c1070d9177ac@jeffhostetler.com>
In-Reply-To
<20171102175013.3371-5-git@jeffhostetler.com>
On 11/2/2017 1:50 PM, Jeff Hostetler wrote:
Show 17 quoted lines
> From: Jeff Hostetler <jeffhost@microsoft.com>
> 
> Create traverse_commit_list_filtered() and add filtering
> interface to allow certain objects to be omitted from the
> traversal.
> ...
> diff --git a/list-objects-filter.c b/list-objects-filter.c
> new file mode 100644
> index 0000000..7f28425
> --- /dev/null
> +++ b/list-objects-filter.c
> ...
> +/*
> + * A filter for list-objects to omit large blobs,
> + * but always include ".git*" special files.
> + * And to OPTIONALLY collect a list of the omitted OIDs.
> + */

Jonathan and I were talking off-list about the performance effects of inspecting the pathnames to identify the ".git*" special files. I added it in my first draft back in the spring, thinking that even if you set the blob-limit to a small number (or zero), you'd probably still always want the .gitattribute and .gitignore files. But now with the addition of the sparse filter and functional dynamic object fetching, I'm not sure I see the need for this.

Also, if the primary use of the blob-limit is to filter out giant binary assets, it is unlikely anyone is going to have a 1MB+ .git* file, so it is unlikely that the is_special_file would include anything that wouldn't already be included by the size criteria.

So, if there's no objections, I think I'll remove this and simplify the blob-limit filter function. (That would let me get rid of the provisional omit code here.)

Jeff
Previous: Jeff HostetlerNext: Jonathan Tan
Message 9 of 20 in “Partial clone part 1: object filtering”
  1. 0/6 Partial clone part 1: object filteringJeff Hostetler, Nov 2, 2017
  2. 1/6 dir: allow exclusions from blob in addition to fileJeff Hostetler, Nov 2, 2017
  3. 2/6 oidmap: add oidmap iterator methodsJeff Hostetler, Nov 2, 2017
  4. 4/6 list-objects: filter objects in traverse_commit_listJeff Hostetler, Nov 2, 2017
  5. Jonathan TanNov 2, 2017
  6. Johannes SchindelinNov 3, 2017
  7. Jeff HostetlerNov 3, 2017
  8. Jeff HostetlerNov 7, 2017
  9. Jeff HostetlerNov 6, 2017
  10. Jonathan TanNov 6, 2017
  11. 6/6 pack-objects: add list-objects filteringJeff Hostetler, Nov 2, 2017
  12. 5/6 rev-list: add list-objects filtering supportJeff Hostetler, Nov 2, 2017
  13. 3/6 oidset: add iterator methods to oidsetJeff Hostetler, Nov 2, 2017
  14. Jonathan TanNov 2, 2017
  15. Jeff HostetlerNov 3, 2017
  16. Junio C HamanoNov 3, 2017
  17. Jeff HostetlerNov 3, 2017
  18. Jonathan TanNov 8, 2017
  19. Junio C HamanoNov 8, 2017
  20. Jeff HostetlerNov 8, 2017

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.