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

Strange behavior of "git log" with file argument

From
VLVincent Lefevre <vincent@vinc17.net>
Date
Jun 19, 2026, 15:44 UTC
Message-ID
<20260619154448.GA769454@qaa.vinc17.org>
With 2.53.0 under Debian/unstable:
* https://github.com/git/git.git repository
  at 95e20213faefeb95df29277c58ac1980ab68f701

"git log git-gui/git-gui--askyesno.sh" outputs nothing. To get logs, I can add the -m option. In particular, this shows 3 non-merge commits.

So the behavior without -m seems incorrect, and at least unhelpful.
* https://gitlab.inria.fr/mpfr/mpfr.git repository
  at 74cb29f0908c2887dc8c3e6ba7a3c5a2f20710a3
"git log --reverse AUTHORS" shows only 2 commits:
  bfa9d064e1cf7a736740c73b9773eabb11da6ed7
  5a9521d1f305268e575c4a5c4de13614acef6321

where bfa9d064e1cf7a736740c73b9773eabb11da6ed7 corresponds to the file creation and 5a9521d1f305268e575c4a5c4de13614acef6321 is unrelated to the AUTHORS file:

  git show 5a9521d1f305268e575c4a5c4de13614acef6321

contains nothing about AUTHORS, and "git log AUTHORS" does not list this commit. But "git log AUTHORS" also lists

  b28347ab59db2a99168a17c3e1804000069199aa
which had been done *before* the AUTHORS file was created!
Note: According to the git-log(1) man page, the --reverse option
is supposed to affect only the order, not the list of commits to
be shown:
  --reverse
      Output the commits chosen to be shown (see Commit Limiting section
      above) in reverse order. Cannot be combined with --walk-reflogs.
-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)
Next: Junio C Hamano
Message 1 of 2 in “Strange behavior of "git log" with file argument”
  1. Vincent LefevreJun 19, 2026
  2. Junio C HamanoJun 19, 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.