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

Re: Missing commits with git log --follow

From
RTRihards Teteris <rihards.teteris@outlook.com>
Date
May 5, 2022, 06:36 UTC
Message-ID
<GV1PR01MB8562EB91A12876611CDD8371EDC29@GV1PR01MB8562.eurprd01.prod.exchangelabs.com>
In-Reply-To
<GV1PR01MB85627EC349E8893EB3B5F47CEDC29@GV1PR01MB8562.eurprd01.prod.exchangelabs.com>
Hello Git,

I think I have found quite interesting bug. For some files git log --follow is missing some commits, even though I would expect it to find more commits. I found a case for that in the git repository itself too:

# git --version git version 2.36.0 # time git log --format=%H contrib/git-resurrect.sh e37eae0c1e13cb418947383f7c803d9463bfa3d7 d047154e7b2ab9c7191b0d72484012085051d521 3c833cae446364872b759c7622af2760a2f81a11 fba275dc93319ffa31ecebe015f8cda671fcf0e5 51ba8ce372ad9fcab04a013252b819625c44770a 50ab6558bf688e15048e189bdaf9174b217e1748 e1ff064e1bffedb917c491681b7bfd4d66633ef5 real 0m0.631s user 0m0.428s sys 0m0.120s

# time git log --format=%H --follow contrib/git-resurrect.sh e37eae0c1e13cb418947383f7c803d9463bfa3d7 d047154e7b2ab9c7191b0d72484012085051d521 fba275dc93319ffa31ecebe015f8cda671fcf0e5 51ba8ce372ad9fcab04a013252b819625c44770a 50ab6558bf688e15048e189bdaf9174b217e1748 e1ff064e1bffedb917c491681b7bfd4d66633ef5 real 0m1.386s user 0m1.272s sys 0m0.066s

You see that with --follow 3c833cae446364872b759c7622af2760a2f81a11 commit is missing.
I also timed it, to note that git log --follow can be much slower. In my project I have seen a case, where git log takes ~10 seconds for a file, but --follow takes ~90 seconds.
Thank you for looking at this.

Best regards, Rihards

Message 1 of 1 in “Re: Missing commits with git log --follow”
  1. Rihards TeterisMay 5, 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.