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

Re: bugreport: performance regression on git log --follow

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 4, 2026, 15:56 UTC
Message-ID
<autVqTLs_pgwVcSE@pks.im>
In-Reply-To
<1491d49cdb1a96698e5572d9de3ac280@posteo.de>
On Wed, Nov 04, 2026 at 07:58:25AM +0000, b.murauer@posteo.de wrote:
Show 38 quoted lines
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> 
> I ran git log --follow on a single file in a repository with about 30k
> commits
> and 27k tracked files:
> 
>     git log --follow --oneline -- path/to/file.ts >/dev/null
> 
> VS Code's Timeline view runs a similar command automatically:
> 
>     git log --no-ext-diff --no-textconv --format=<format> -z -n551
> --shortstat \
>         --follow -- path/to/file.ts
> 
> We regularly merge older maintenance branches forward into main. The
> affected
> file was added on main and does not exist on those branches, so many merges
> have
> a parent that lacks it. The following command reports 692 commits for this
> file:
> 
>     git log --full-history -m --diff-filter=A --format=%h -- path/to/file.ts
> |
>         sort -u | wc -l
> 
> What did you expect to happen? (Expected behavior)
> 
> I expected the command to finish in a time comparable to earlier Git
> versions.
> With Git 2.43 on the same history, it takes about 1 second.
> 
> What happened instead? (Actual behavior)
> 
> With Git 2.56, the command takes around 10 minutes. It uses one CPU core
> for the whole run, with very little system time, and output appears slowly.

Thanks for your report! This is a known issue which was originally reported at [1]. That thread also has some patches that are currently in review.

Patrick
[1]: https://lore.kernel.org/git/as44NVKZA9C9S5ae@pks.im/
Previous: b.murauer@posteo.de
Message 2 of 2 in “bugreport: performance regression on git log --follow”
  1. b.murauer@posteo.deNov 4, 2026
  2. Patrick SteinhardtNov 4, 2026

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.