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.