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

Re: [BUG?] Major performance issue with some commands on our repo's master branch

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 9, 2022, 18:23 UTC
Message-ID
<xmqqedzxlmpt.fsf@gitster.g>
In-Reply-To
<YqILyX97zKg5ViUS@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
>   git show --diff-filter=D -s a6434bc6f7a1
>
> Without the patch above, it always shows the commit. With it, it shows
> nothing. That's a bit far-fetched, but it is a regression, and I'm also
> not sure if it's just the tip of the iceberg.

Here "-s" is merely "do not give patch output like we do by default", so the behaviour is quite understandable and is not a regression we would want to see happen. -S/-G are also likely to be affected, not just the --diff-filter.

> It also doesn't solve problem completely. Regular commits can have
> expensive diffs, too.
That's a good point.
> I think you'd do better to have a mode specific to git-show that skips
> the diff if we're not showing it, but makes sure to always show the
> commit anyway.

Meaning an explicit option "git show --log-only"? We'd need to careful to make it either (1) be incompatible with certain features of "git show" (like giving a pathspec) and error out, or (2) ignore these features of "git show" silently and document that. But it would work as a new option.

Thanks.
Previous: Jeff KingNext: Jeff King
Message 8 of 12 in “[BUG?] Major performance issue with some commands on our repo's master branch”
  1. Tassilo HornJun 4, 2022
  2. Tao KlerksJun 4, 2022
  3. Tassilo HornJun 5, 2022
  4. Tao KlerksJun 6, 2022
  5. Jeff KingJun 8, 2022
  6. Kyle MeyerJun 9, 2022
  7. Jeff KingJun 9, 2022
  8. Junio C HamanoJun 9, 2022
  9. Jeff KingJun 9, 2022
  10. Junio C HamanoJun 9, 2022
  11. Tassilo HornJun 9, 2022
  12. Jeff KingJun 9, 2022

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.