Skip to contentSkip to conversation

git log --grep missing entries?

DISCUSSION Chris Frey 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore

Chris Frey

author
#0 lore raw

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 <[email protected]>

# nothing appears for these commands git log --grep="[email protected]" git log --grep="google.com"
git log --grep="thadh"

# this works
git log --author="[email protected]"

# this works
git log | grep [email protected]

- Chris

#1 lore raw
Quoted 17 lines · Chris Frey

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 <[email protected]>

# nothing appears for these commands git log --grep="[email protected]" git log --grep="google.com"
git log --grep="thadh"

Quoted 5 lines

# this works
git log --author="[email protected]"

# this works
git log | grep [email protected]

--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

author
#3 lore raw
Quoted 2 lines · Lea Wiemann

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