From: Jeff King Date: Thu, 03 Jul 2025 15:36:11 GMT Subject: Re: Re Behavior of git log --diff-filter=d Message-ID: <20250703153611.GB1309870@coredump.intra.peff.net> In-Reply-To: <20250703134220.31638-1-jayatheerthkulkarni2005@gmail.com> On Thu, Jul 03, 2025 at 07:12:20PM +0530, K Jayatheerth wrote: > Yes, this is expected behavior > You're seeing a difference because > > --diff-filter=d tells Git to exclude commits that have deleted files in their diffs. > However, this filter only applies if there is a diff to filter. I don't think that is true. Even if we are not showing a diff, we'll select which commits to show based on diff options (and show only those that still touch something). That's why "--diff-filter=D" shows only the commit with the deletion. With the "d" filter we should omit deletions, leaving the second commit with no changes (and thus not shown). -Peff