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

Re: [PATCH] rev-list: skip bitmap traversal for --left-right

From
Jeff King <peff@peff.net>
Date
Nov 4, 2024, 17:46 UTC
Message-ID
<20241104174628.GA2990236@coredump.intra.peff.net>
In-Reply-To
<20241104174126.GB2985568@coredump.intra.peff.net>
On Mon, Nov 04, 2024 at 12:41:27PM -0500, Jeff King wrote:
Show 16 quoted lines
> On Fri, Nov 01, 2024 at 10:40:41AM -0400, Taylor Blau wrote:
> 
> > Nice find, and well explained (not just why it doesn't work today but
> > could in the future, but why making it work in the future with bitmaps
> > does not necessarily a clear performance improvement).
> > 
> > Probably you and I should think more about other rev-list options that
> > *don't* work with --use-bitmap-index. I share your feeling there that
> > there probably exist such options which silently do nothing (or the
> > wrong thing) in the presence of '--use-bitmap-index'.
> 
> I'm pretty sure --cherry-pick and --cherry-mark are examples, but I
> suspect it's the tip of the iceberg. I don't know if it's worth spending
> much effort on this. It's certainly a wart, but there's a certain amount
> of "if it hurts, don't do it". The --left-right one bugged me so much
> just because I thought it _would_ work. ;)

Actually, I wonder if this could be an interesting #leftoverbits or intern mini-project:

  1. Look at the set of rev-list options and pick one.
  2. Repack a repo (say, git.git) with reachability bitmaps using "git
     repack -adb".
  3. Compare output of "rev-list --your-option" with and without
     --use-bitmap-index. If the outputs do not reasonably match, add
     code to try_bitmap_traversal() to forbid it and bail to the
     non-bitmap path. Maybe also other try_bitmap_*() functions, as
     well.

It's a little more involved than other miniprojects just because there may be some judgement needed for "reasonably match". Being byte-for-byte identical is good, but in some cases the output will be different (e.g., bitmap output is in a different order, lacks path annotations, etc). So it would help in step (1) if you understand what the option is supposed to do and how you'd expect it to work with bitmaps. ;)

-Peff
Previous: Jeff KingNext: Taylor Blau
Message 4 of 6 in “rev-list: skip bitmap traversal for --left-right”
  1. rev-list: skip bitmap traversal for --left-rightJeff King, Nov 1, 2024
  2. Taylor BlauNov 1, 2024
  3. Jeff KingNov 4, 2024
  4. Jeff KingNov 4, 2024
  5. Taylor BlauNov 4, 2024
  6. Ayush ChandekarFeb 2, 2025

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.