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

Re: [PATCH v4 5/6] rev-list: add list-objects filtering support

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Nov 16, 2017, 20:43 UTC
Message-ID
<20171116124354.3d800cc27dbe3ea668c64519@google.com>
In-Reply-To
<20171116180743.61353-6-git@jeffhostetler.com>

On Thu, 16 Nov 2017 18:07:42 +0000 Jeff Hostetler <git@jeffhostetler.com> wrote:

Show 24 quoted lines
> From: Jeff Hostetler <jeffhost@microsoft.com>
> 
> Teach rev-list to use the filtering provided by the
> traverse_commit_list_filtered() interface to omit
> unwanted objects from the result.  This feature is
> intended to help with partial clone.
> 
> Object filtering is only allowed when one of the "--objects*"
> options are used.
> 
> When the "--filter-print-omitted" option is used, the omitted
> objects are printed at the end.  These are marked with a "~".
> This option can be combined with "--quiet" to get a list of
> just the omitted objects.
> 
> Added "--missing=(error|print|omit)" argument to specify how
> rev-list should behave when it encounters a missing object
> (presumably from a prior partial clone).
> 
> When "--missing=print" is used, rev-list will print a list of
> any missing objects that should have been included in the output.
> These are marked with a "?".
> 
> Add t6112 test.

The patch itself looks good, except that I have a nagging feeling about the usage of the term "partial clone" in the commit message, documentation, and test description. I feel that the usage here leads one to believe that partial clones haphazardly leave repositories without random objects (and at the point that this patch is merged, there will not be any patch in the main repo contradicting this viewpoint), contrary to the fact that we will have a tracking mechanism to track which missing objects are expected to be missing. (If I'm the only one feeling this way, though, then I'll just let it slide.)

If it were up to me, I would remove all existing mentions of "partial clone" and explain the presence of the "--missing" argument as follows:

    In the future, we will introduce a "partial clone" mechanism wherein
    an object in a repo, obtained from a remote, may reference a missing
    object that can be dynamically fetched from that remote once needed.
    This "partial clone" mechanism will have a way, sometimes slow, of
    determining if a missing link is one of the links expected to be
    produced by this mechanism.
    This patch introduces handling of missing objects to help debugging
    and development of the "partial clone" mechanism, and once the
    mechanism is implemented, for a power user to perform operations
    that are missing-object-aware without incurring the cost of checking
    if a missing link is expected.
Previous: Jeff HostetlerNext: Junio C Hamano
Message 6 of 16 in “Partial clone part 1: object filtering”
  1. 0/6 Partial clone part 1: object filteringJeff Hostetler, Nov 16, 2017
  2. 1/6 dir: allow exclusions from blob in addition to fileJeff Hostetler, Nov 16, 2017
  3. 3/6 oidset: add iterator methods to oidsetJeff Hostetler, Nov 16, 2017
  4. 2/6 oidmap: add oidmap iterator methodsJeff Hostetler, Nov 16, 2017
  5. 5/6 rev-list: add list-objects filtering supportJeff Hostetler, Nov 16, 2017
  6. Jonathan TanNov 16, 2017
  7. Junio C HamanoNov 17, 2017
  8. Jeff HostetlerNov 17, 2017
  9. 6/6 pack-objects: add list-objects filteringJeff Hostetler, Nov 16, 2017
  10. 4/6 list-objects: filter objects in traverse_commit_listJeff Hostetler, Nov 16, 2017
  11. Jonathan TanNov 16, 2017
  12. Jeff HostetlerNov 16, 2017
  13. Jeff KingNov 16, 2017
  14. Junio C HamanoNov 17, 2017
  15. Jeff HostetlerNov 17, 2017
  16. Jeff KingNov 17, 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.