Git log without an author's commits

You need a Regular expression to match a line that doesn't contain a word? Negative lookahead will do just that, but you have to ask git to use --perl-regexp.

git log --author='^(?!krlmlr).*$' --perl-regexp

According to git help log,

--perl-regexp ... requires libpcre to be compiled in.

Apparently, not all gits out there have this; for the one shipped with Ubuntu 13.04, this works out of the box.


git rev-list --format='%aN' --all \
| sed 'N;/\nauthorname$/d;s/commit \(.*\)/\n.*/\1/' \
| git log --stdin

and of course substitute whatever heads you want for --all above.

Edit: list/select/process pipelines like this are bread and butter, it's just how git (like a lot of unix tools) was built.

Tags:

Git