Re: Bug report: --invert-grep and --author seems to be incompatible.
- From
Jehan Pagès <jehan.marmottard@gmail.com>
- Date
- Jul 13, 2016, 17:16 UTC
- Message-ID
- <CAFgjPJ-E=eW_ZiAUf2jKu6z3WfW_p+BMbEJwf=OSGUXQB78kwQ@mail.gmail.com>
- In-Reply-To
- <xmqqtwft1nbi.fsf@gitster.mtv.corp.google.com>
Hi,
On Wed, Jul 13, 2016 at 7:04 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> Jehan Pagès <jehan.marmottard@gmail.com> writes: > >>> git log --author=someone --invert-grep --grep=something >> >> But it does not work. Actually it looks like it just returns >> everything (as though I had done a simple `git log`). > > Do you see a commit that is by "someone" and has "something" in it > in the output from the command?
Indeed you are right! Commits which are by "someone" and have "something" in it in the same time are missing. So here --invert-grep works as a big "NOT" operator on the whole rest of the command line, which is not expected (at least by me).
> I think --author=someone greps the "author " field in the commit > object looking for the hit with "someone", and your request asks to > show commits that either do not have "something" or was not written > by "someone", I would guess.
Note that I can still see commits with "something", and I can also see commits by "someone" in my results. So my request actually ask for commits which have neither "something" nor are done by "someone".
Anyway I don't think that's the expected result, hence is still a bug. Am I wrong?
Jehan
-- ZeMarmot open animation film http://film.zemarmot.net Patreon: https://patreon.com/zemarmot Tipeee: https://www.tipeee.com/zemarmot