# git log --grep missing entries?

4 messages from 2008-05-27 to 2008-05-27. Participants: Chris Frey, Lea Wiemann, Björn Steinbrink.
Thread: https://gitlist.dev/t/13695

## Chris Frey, 2008-05-27 20:28

Subject: git log --grep missing entries?
Message-ID: <20080527202842.GA32252@foursquare.net>
URL: https://gitlist.dev/e/20080527202842.GA32252%40foursquare.net

```
Hi,

I ran into this the other day when I was looking at jgit's log history.
I retested today with the latest master branch, and it does the same thing.

So... what am I doing wrong?

	git clone git://repo.or.cz/egit/spearce.git bsd
	git log |grep "^Author:" | sort | uniq

	# note the user: Thad Hughes <thadh@thad.corp.google.com>

	# nothing appears for these commands
	git log --grep="thadh@thad.corp.google.com"
	git log --grep="google.com"
	git log --grep="thadh"

	# this works
	git log --author="thadh@thad.corp.google.com"

	# this works
	git log | grep thadh@thad.corp.google.com

- Chris

```

## Lea Wiemann, 2008-05-27 20:36

Subject: Re: git log --grep missing entries?
Message-ID: <483C70E3.3060607@gmail.com>
URL: https://gitlist.dev/e/483C70E3.3060607%40gmail.com
In-Reply-To: <20080527202842.GA32252@foursquare.net>

```
Chris Frey wrote:
> 	# nothing appears for these commands
> 	git log --grep="thadh@thad.corp.google.com"
> 	# this works
> 	git log --author="thadh@thad.corp.google.com"

According to the man page of git-log, --grep only greps the log message, 
not the author.  Does that help?

-- Lea

```

## Björn Steinbrink, 2008-05-27 20:40

Subject: Re: git log --grep missing entries?
Message-ID: <20080527204032.GA26161@atjola.homenet>
URL: https://gitlist.dev/e/20080527204032.GA26161%40atjola.homenet
In-Reply-To: <20080527202842.GA32252@foursquare.net>

```
On 2008.05.27 16:28:42 -0400, Chris Frey wrote:
> Hi,
> 
> I ran into this the other day when I was looking at jgit's log history.
> I retested today with the latest master branch, and it does the same thing.
> 
> So... what am I doing wrong?
> 
> 	git clone git://repo.or.cz/egit/spearce.git bsd
> 	git log |grep "^Author:" | sort | uniq
> 
> 	# note the user: Thad Hughes <thadh@thad.corp.google.com>
> 
> 	# nothing appears for these commands
> 	git log --grep="thadh@thad.corp.google.com"
> 	git log --grep="google.com"
> 	git log --grep="thadh"
> 
> 	# this works
> 	git log --author="thadh@thad.corp.google.com"
> 
> 	# this works
> 	git log | grep thadh@thad.corp.google.com

--grep only works on the log message, not on the author or committer
fields. As Thad's commit does not have a SoB line, --grep won't find it.

Björn

```

## Chris Frey, 2008-05-27 20:48

Subject: Re: git log --grep missing entries?
Message-ID: <20080527204848.GA13929@foursquare.net>
URL: https://gitlist.dev/e/20080527204848.GA13929%40foursquare.net
In-Reply-To: <483C70E3.3060607@gmail.com>

```
On Tue, May 27, 2008 at 10:36:51PM +0200, Lea Wiemann wrote:
> According to the man page of git-log, --grep only greps the log message, 
> not the author.  Does that help?

Doh.  That would certainly explain it.  Thanks!

- Chris

```
