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

[PATCH v2 0/6] Partial clone part 1: object filtering

From
JHJeff Hostetler <git@jeffhostetler.com>
Date
Nov 2, 2017, 17:50 UTC
Message-ID
<20171102175013.3371-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>

Here is V2 of the list-object filtering. It replaces [1] and reflect a refactoring and simplification of the original.

After much discussion on the "list-object-filter-map" I've replaced it with a regular oidset -- the only need for the map was to store the first observed pathname for each blob, but that itself was of questionable value.

I've extended oidmap and oidset to have iterators. These 2 commits could be pulled out and applied on their own, but for now I need them here.

There were also several comments on the layout of the filtering API and the layout of the filter source code. I've restructured the filtering routines to put them in the same source file, and made them all static. These are now hidden behind a "factory-like" function with a vtable. This greatly simplifies the code in traverse_commit_list_filtered().

I've added "--filter-ignore-missing" parameter to rev-list and pack-objects to ignore missing objects rather than error out. This allows this patch series to better stand on its own eliminates the need in part 1 for "patch 9" from V1.

This is a brute force ignore all missing objects. Later, in part 2 or part 3 when --exclude-promisor-objects is introduced, we will be able to ignore EXPECTED missing objects.

Finally, patch 1 in this series is the same [2] which is currently cooking in next.

[1] https://public-inbox.org/git/20171024185332.57261-1-git@jeffhostetler.com/
[2] * jh/dir-add-exclude-from-blob (2017-10-27) 1 commit
    - dir: allow exclusions from blob in addition to file
Jeff Hostetler (6):
  dir: allow exclusions from blob in addition to file
  oidmap: add oidmap iterator methods
  oidset: add iterator methods to oidset
  list-objects: filter objects in traverse_commit_list
  rev-list: add list-objects filtering support
  pack-objects: add list-objects filtering
 Documentation/git-pack-objects.txt     |  12 +-
 Documentation/git-rev-list.txt         |   6 +-
 Documentation/rev-list-options.txt     |  34 +++
 Makefile                               |   2 +
 builtin/pack-objects.c                 |  28 ++-
 builtin/rev-list.c                     |  75 +++++-
 dir.c                                  | 132 ++++++++---
 dir.h                                  |   3 +
 list-objects-filter-options.c          | 119 ++++++++++
 list-objects-filter-options.h          |  55 +++++
 list-objects-filter.c                  | 408 +++++++++++++++++++++++++++++++++
 list-objects-filter.h                  |  84 +++++++
 list-objects.c                         |  95 ++++++--
 list-objects.h                         |   2 +-
 oidmap.h                               |  22 ++
 oidset.c                               |  10 +
 oidset.h                               |  36 +++
 t/t5317-pack-objects-filter-objects.sh | 369 +++++++++++++++++++++++++++++
 t/t6112-rev-list-filters-objects.sh    | 225 ++++++++++++++++++
 19 files changed, 1664 insertions(+), 53 deletions(-)
 create mode 100644 list-objects-filter-options.c
 create mode 100644 list-objects-filter-options.h
 create mode 100644 list-objects-filter.c
 create mode 100644 list-objects-filter.h
 create mode 100755 t/t5317-pack-objects-filter-objects.sh
 create mode 100755 t/t6112-rev-list-filters-objects.sh
-- 
2.9.3
Next: Jeff Hostetler
Message 1 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.