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

Re: [PATCH 2/3] revision: exclude trees/blobs given commit

From
Jeff King <peff@peff.net>
Date
Feb 28, 2017, 22:12 UTC
Message-ID
<20170228221236.selqkf5wme3fvued@sigill.intra.peff.net>
In-Reply-To
<7082d91f30663b2e6d7fb1795c5ea37d3fe3446c.1487984670.git.jonathantanmy@google.com>
On Fri, Feb 24, 2017 at 05:18:37PM -0800, Jonathan Tan wrote:
Show 5 quoted lines
> When the --objects argument is given to rev-list, an argument of the
> form "^$tree" can be given to exclude all blobs and trees reachable from
> that tree, but an argument of the form "^$commit" only excludes that
> commit, not any blob or tree reachable from it. Make "^$commit" behave
> consistent to "^$tree".

Like Junio, I suspect this is going to be quite expensive. This is similar to the "--objects-edge" and "--objects-edge-aggressive" options, which we had to pull back on the use of because of their expensiveness.

(And as an aside, wouldn't those options be the right place for what you're doing?).

I also think that the mechanism here is not 100% accurate. The commit traversal will stop once it has painted down, so you're effectively exploring the trees of the merge bases. But older history could mention an object that has resurfaced again (e.g., due to a cherry-pick).

Getting the 100% accurate answer is _really_ expensive, though with reachability bitmaps it's not too bad. I just wonder if that's a better approach to be taking.

-Peff
Previous: Junio C HamanoNext: Jonathan Tan
Message 4 of 17 in “Test fetch-pack's ability to fetch arbitrary blobs”
  1. 0/3 Test fetch-pack's ability to fetch arbitrary blobsJonathan Tan, Feb 25, 2017
  2. 2/3 revision: exclude trees/blobs given commitJonathan Tan, Feb 25, 2017
  3. Junio C HamanoFeb 28, 2017
  4. Jeff KingFeb 28, 2017
  5. t/perf: export variable used in other blocksJonathan Tan, Mar 2, 2017
  6. Jeff KingMar 3, 2017
  7. t/perf: use $MODERN_GIT for all repo-copying stepsJeff King, Mar 3, 2017
  8. t/perf: add fallback for pre-bin-wrappers versions of gitJeff King, Mar 3, 2017
  9. Junio C HamanoMar 3, 2017
  10. Jeff KingMar 3, 2017
  11. Junio C HamanoFeb 28, 2017
  12. 1/3 revision: unify {tree,blob}_objects in rev_infoJonathan Tan, Feb 25, 2017
  13. Junio C HamanoFeb 28, 2017
  14. Jeff KingFeb 28, 2017
  15. Junio C HamanoMar 2, 2017
  16. Jeff KingFeb 28, 2017
  17. 3/3 upload-pack: compute blob reachability correctlyJonathan Tan, Feb 25, 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.