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

git log FILE vs git log --follow FILE missing commits

From
Chris Packham <judge.packham@gmail.com>
Date
Feb 2, 2020, 21:27 UTC
Message-ID
<CAFOYHZAx-MM26AuJmscK=kGgukQ62vkyqAqU49U-5WRaTp4mGQ@mail.gmail.com>
Hi,

I've just hit a problem where git log doesn't want to tell me about a commit that touches a specific file.

I wanted to point someone at a particular change that I knew was made to a file so I fired up 'git log FILE' and to my surprise it wasn't listed. I wondered if I had remembered wrong so went grepping to confirm the change was in the file I thought it was, sure enough it was there.

Poking around a bit I found that git log --follow FILE shows the intended commit but git log FILE doesn't (it does show other commits that touch the file, most of which have tags if that's significant). The file hasn't been renamed so I didn't really expect --follow to change any behavior.

The version of git I'm using is 2.25.0 from http://ppa.launchpad.net/git-core/ppa/ubuntu bionic main. I also tried 2.24.1 and 2.23.1 with the same problem.

Any suggestions for tracking this down?

Thanks, Chris

Next: Kevin Daudt
Message 1 of 3 in “git log FILE vs git log --follow FILE missing commits”
  1. Chris PackhamFeb 2, 2020
  2. Kevin DaudtFeb 2, 2020
  3. Chris PackhamFeb 2, 2020

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.