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

Re: [RFC PATCH 2/3] Documentation/git-rev-list: s/<commit>/<object>/

From
Matthew DeVore <matvore@google.com>
Date
Dec 7, 2018, 22:55 UTC
Message-ID
<CAMfpvh+6r65OqWpY-geOYHizs526A1004vakKSdxnO=fsahdAg@mail.gmail.com>
In-Reply-To
<xmqqo9bmyb56.fsf@gitster-ct.c.googlers.com>
On Sun, Oct 21, 2018 at 7:21 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
>
> Matthew DeVore <matvore@google.com> writes:
>
> >> It is more like "this is a set operation across commits.  We also
> >> show objects that are reachable from the commits in the resulting
> >> set and are not reachable from the commits in the set that were
> >> excluded when --objects option is given".
> >>
> > That would be correct though it wouldn't tell that you can use
> > "--objects ^foo-tree bar-tree."
>
> Yeah, but quite honestly, I consider that it is working by accident,
> not by design, in the current code (iow, you are looking at a
> behaviour of whatever the code happens to do).  "rev-list" is pretty
> much set operation across commits, and anything that deals with a
> non commit-ish given from the command line is an afterthought at
> best, and happenstance in reality.
>
> I do not mean to say that the code must stay that way, though.

I tried fixing the issue of "--objects ^commitobj treeobj" not properly excluding objects reachable from commitobj, but this ended up causing t5616-partial-clone.sh to fail. In the test labeled "manual prefetch of missing objects", we create a clone of srv.bare without blobs called "pc1", then push some new commits to srv.bare (via a separate "local" repo), and try to fetch missing blobs with this command:

$ git -C pc1 fetch-pack --stdin "file://$(pwd)/srv.bare" <observed.oids

Where observed.oids contains all the blobs that were missing. It tells the remote that it already has the "refs/heads/master" commit, which means it is excluded. Before, this worked fine, since it didn't mean the blobs were excluded, only the commit itself. With the fix I naively put together (and didn't share), because one of the blobs is reachable from "refs/heads/master" it wouldn't pull it. I guess I can change it so that items given directly to stdin or argv are always fetched, though I'm not sure how easy that will be, and I'm not as interested in fixing this as I once was. I just wanted the documentation to outline the object-enumeration capabilities. So I'll send a re-roll which makes much more modest changes to the documentation.

Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 14 in “support for filtering trees and blobs based on depth”
  1. 0/3 support for filtering trees and blobs based on depthMatthew DeVore, Oct 11, 2018
  2. 1/3 list-objects: support for skipping tree traversalMatthew DeVore, Oct 11, 2018
  3. Junio C HamanoOct 14, 2018
  4. Matthew DeVoreOct 18, 2018
  5. 2/3 Documentation/git-rev-list: s/<commit>/<object>/Matthew DeVore, Oct 11, 2018
  6. Junio C HamanoOct 14, 2018
  7. Matthew DeVoreOct 20, 2018
  8. Junio C HamanoOct 22, 2018
  9. Matthew DeVoreDec 7, 2018
  10. Junio C HamanoDec 8, 2018
  11. 3/3 list-objects-filter: teach tree:# how to handle >0Matthew DeVore, Oct 11, 2018
  12. Junio C HamanoOct 15, 2018
  13. Matthew DeVoreNov 8, 2018
  14. Matthew DeVoreDec 10, 2018

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.