Re: Bug: `git show` honors path filters only for the first commit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 30, 2022, 04:59 UTC
- Message-ID
- <xmqqzgk388tt.fsf@gitster.g>
- In-Reply-To
- <CAHVT7hW28jMcphDPhcUG==mycCWDaAt46wWo68=oTcSvebHWwg@mail.gmail.com>
Daniel Li <dan@danielyli.com> writes:
> git version: 2.36.0 > OS: macOS Monterey 12.2.1 > Installed via: homebrew
I think this is the same regression as the recently talked about "diff-tree --stdin" aka "gitk" regression.
https://lore.kernel.org/git/xmqq7d7bsu2n.fsf@gitster.g/
e900d494 (diff: add an API for deferred freeing, 2021-02-11), broke cmd_log_walk(), and we started to lose some setting that was parsed from the command line and stored in the diff_options structure after cmd_log_walk() runs just once. But "git show A B" runs the function once for each commit. A recent change in 2.36.0 made it worse by adding <pathspec> to the set of setting that gets lost after cmd_log_walk() runs once.
Thanks for a report.