Re: git log -S not finding all commits?
- From
- Daniel <mjucde@o2.pl>
- Date
- Oct 8, 2009, 11:07 UTC
- Message-ID
- <362436ca.6b5d0fc3.4acdc7e1.41b23@o2.pl>
- In-Reply-To
- <4ACDACE6.9060509@op5.se>
Andreas Ericsson <ae@op5.se> wrote:
Show 5 quoted lines
> Yes, it's the correct behaviour. -S finds only lines where what you search > for was added or deleted. It counts the number of occurrences of what you > specify in each resulting tree and only shows the commits where that number > changed. In your case, searching for "Free data " would have printed both > commits, since you first introduce that entire string and then remove it.
Thanks. However, your suggestion doesn't work. It prints only commit 2. Maybe you meant:
$ PAGER=cat git log --pickaxe-regex -S'Free data$' --oneline
but that doesn't solve my problem. I want to find all commits which changed lines containing "Free data" (the example I posted is simplified).
Seems I have to use "git log -p" and search its output using pager...
-- Daniel