bug: `git log --grep ... --invert-grep --author=...` negates / ignores --author

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Given the following commits:

```
asottile@asottile-VirtualBox:/tmp$ git init test
Initialized empty Git repository in /tmp/test/.git/
asottile@asottile-VirtualBox:/tmp$ cd test/
asottile@asottile-VirtualBox:/tmp/test$
GIT_COMMITTER_EMAIL=foo@xxxxxxxxxxx GIT_AUTHOR_EMAIL=foo@xxxxxxxxxxx
git commit --allow-empty -m "foo"
[master (root-commit) c9df62b] foo
asottile@asottile-VirtualBox:/tmp/test$ git commit -m "blah" --allow-empty
[master 9e3ee9b] blah
asottile@asottile-VirtualBox:/tmp/test$ git log
commit 9e3ee9bc1adab2ae8eb1884a8f6237da18dfd27b
Author: Anthony Sottile <asottile@xxxxxxxxx>
Date:   Wed May 31 08:40:59 2017 -0700

    blah

commit c9df62b93298a247fcfbe24ed4282ccf95448f47
Author: Anthony Sottile <foo@xxxxxxxxxxx>
Date:   Wed May 31 08:40:49 2017 -0700

    foo
asottile@asottile-VirtualBox:/tmp/test$ git log --grep bar
--invert-grep --author=foo
commit 9e3ee9bc1adab2ae8eb1884a8f6237da18dfd27b
Author: Anthony Sottile <asottile@xxxxxxxxx>
Date:   Wed May 31 08:40:59 2017 -0700

    blah

commit c9df62b93298a247fcfbe24ed4282ccf95448f47
Author: Anthony Sottile <foo@xxxxxxxxxxx>
Date:   Wed May 31 08:40:49 2017 -0700

    foo
asottile@asottile-VirtualBox:/tmp/test$ git log --author=foocommit
c9df62b93298a247fcfbe24ed4282ccf95448f47
Author: Anthony Sottile <foo@xxxxxxxxxxx>
Date:   Wed May 31 08:40:49 2017 -0700

    foo
```

I expect the same output from the last two commands, but the
`--invert-grep` one seems to match _all_ the commits.

I can try and dig into this if I have time, just trying to get a count
using this as a workaround

git log --grep ... --invert-grep --format=%ce | grep ... | wc -l

Anthony



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]