Re: Bug report: --invert-grep and --author seems to be incompatible.

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

 



Jehan Pagès <jehan.marmottard@xxxxxxxxx> writes:

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

Unlike "git grep", "git log" works with boolean expression that does
not explicitly have a way to say "--and" and "--or", so only one
interpretation has been chosen long time ago.  All the terms are
ORed together, and then the whole thing can be inverted with
"--invert-grep".  i.e. you are telling an equivalent of

    $ git grep --not \( -e "author someone" --or -e "something" \)

with the command line, and there is no way to combine the requested
match criteria (there are two, "author must be somebody" and
"something must be in the message") differently.

Given that, that is the "right" expectation, and as long as you get
the behaviour, there is no "bug".

You can call it a lack of feature, though, and patches to implement
a more flexible combination of match criteria like "git grep" allows
is always welcome.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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