Re: Finding all commits which modify a file
- From
- Santi Béjar <santi@agolina.net>
- Date
- Jan 24, 2012, 01:15 UTC
- Message-ID
- <CA+gHt1Cfn3H2-d5PN-E6Q0XTNC7V7i+xkS4DRaTc=jYXLhDU9g@mail.gmail.com>
- In-Reply-To
- <CA+gHt1DxY42W9g+gJQTFrXuXBN-Jny+Jg60gKssdftZ5wxu91A@mail.gmail.com>
On Tue, Jan 24, 2012 at 1:58 AM, Santi Béjar <santi@agolina.net> wrote:
Show 19 quoted lines
> [Note: CC main authors of the code surrounding the patch] > > On Mon, Jan 23, 2012 at 5:14 PM, Neal Groothuis <ngroot@lo-cal.org> wrote: >>> On 1/20/2012 3:35 PM, Neal Groothuis wrote: >>>> I'm trying to find /all/ commits that change a file in the >>>> repository...and its proving to be trickier than I thought. :-) >> >> On 1/21/2012 6:16 PM, Neal Kreitzinger wrote: >>> Does git-log --all help? >> >> I don't see how it would. The commits are all reachable from HEAD, which >> would seem to be the problem that --all would correct. >> >> What I'm trying to do is find the commits in which a file differs from >> that same file in any of its parents. > > If you add parent rewriting (--parent, --graph or see it in gitk, with > --full-history) you'll get your B2 commit as it adds commits to have a > meaningful history. But I don't think this is what you are asking for.
Note that even if it get listed, you won't get a diff for foo.txt because it is an evil merge as the result is not the expected (using the three way merge) one but is equal to one of the branches.
HTH, Santi