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

Re: Strange behavior of "git log" with file argument

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 19, 2026, 17:02 UTC
Message-ID
<xmqqwlvujwfi.fsf@gitster.g>
In-Reply-To
<20260619154448.GA769454@qaa.vinc17.org>
Vincent Lefevre <vincent@vinc17.net> writes:
> "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.
This is a known joy of subtree-merge hack.
You could probably do 
    $ git log -- git-gui/git-gui--askyesno.sh git-gui--askyesno.sh

The thing is, in git-gui project, git-gui--askyesno.sh script is at the root level of its working tree, and we are subtree-merging it in a subdirectory. Once the history traversal realizes that a change to the script came from git-gui history, it would need to be told that it needs to pay attention to git-gui--askyesno.sh at the root tree as well.

Previous: Vincent Lefevre
Message 2 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.