[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: Git bug: Filter ignored when "--invert-grep" option is used.
From:       Junio C Hamano <gitster () pobox ! com>
Date:       2021-12-15 22:08:51
Message-ID: xmqqzgp134i4.fsf () gitster ! g
[Download RAW message or body]

Dotan Cohen <dotancohen@gmail.com> writes:

> What did you do before the bug happened?
> $ git log -8 --author=Shachar --grep=Revert --invert-grep
>
> What did you expect to happen?
> I expected to see the last 8 commits from Shachar that did not have
> the string "Revert" in the commit message.
>
> What happened instead?
> The list of commits included commits by authors other than Shachar.
>
> What's different between what you expected and what actually happened?
> The "--author" filter seems to be ignored when the "--invert-grep"
> option is used.
> I also tried to change the order of the options, but the results
> remained the same.

I think --author and --grep uses the same internal pattern matching
engine, so with --invert-grep, I would not be surprised if the
command looks for commits that do not have Revert and (or is that
or?  I dunno) not authored by Shachar.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic