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

Re: limiting git branch --contains

From
Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Date
Mar 24, 2023, 22:06 UTC
Message-ID
<ZB4e/yE+25W66z6S@ugly>
In-Reply-To
<20230324204504.GB549549@coredump.intra.peff.net>
On Fri, Mar 24, 2023 at 04:45:04PM -0400, Jeff King wrote:
Show 6 quoted lines
>On Fri, Mar 24, 2023 at 08:58:39PM +0100, Oswald Buddenhagen wrote:
>> so i tried git log --graph ... and still nothing?!
>
>That "--graph" option is unrelated. It asks for Git to draw a graph in
>the output.
>

i know. it just happens to be the go-to example from derrick's blog post about commit-graph, so that not working was a dead giveaway that something is really wrong.

Show 5 quoted lines
>> a3628e41a9946c4fe93d9b2ae5906e1b2184fa8e refs/replace/1da177e4c3f41524e886b7f1b8a0c1fc7321cac2
>
>Ah, that is your problem. When "replace" refs are in use, the data
>stored in the commit-graph can't reliably be used. [...]
>

why isn't the commit-graph built with the replaces applied (and tagged by a hash of the used replaces, so we know when to ignore it)?

at minimum, i'd expect a warning giving a reason when the graph is ignored.

>  git -c core.useReplaceRefs=false branch --contains ...
>
>which I think should get faster.
>
yes, that works. and _rather_ convincingly, to put it that way.
Show 5 quoted lines
>I'd still be curious to see the
>difference between "just commit graphs" and "commit graphs plus the
>patch I showed earlier". I think it should make things faster, but if
>it's only a few milliseconds on average, it's not that urgent to pursue.
>
if there is a speed difference at all, it gets drowned out by the noise.
Previous: Jeff KingNext: Jeff King
Message 11 of 17 in “limiting git branch --contains”
  1. Oswald BuddenhagenMar 23, 2023
  2. Junio C HamanoMar 23, 2023
  3. Oswald BuddenhagenMar 23, 2023
  4. Derrick StoleeMar 24, 2023
  5. Oswald BuddenhagenMar 24, 2023
  6. Derrick StoleeMar 24, 2023
  7. Oswald BuddenhagenMar 24, 2023
  8. Jeff KingMar 24, 2023
  9. Oswald BuddenhagenMar 24, 2023
  10. Jeff KingMar 24, 2023
  11. Oswald BuddenhagenMar 24, 2023
  12. Jeff KingMar 25, 2023
  13. Oswald BuddenhagenMar 25, 2023
  14. Jeff KingMar 24, 2023
  15. Kristofer KarlssonMay 27, 2026
  16. Jeff KingJun 8, 2026
  17. Felipe ContrerasMar 23, 2023

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.