git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Dotan Cohen <dotancohen@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git bug: Filter ignored when "--invert-grep" option is used.
Date: Wed, 15 Dec 2021 14:08:51 -0800	[thread overview]
Message-ID: <xmqqzgp134i4.fsf@gitster.g> (raw)
In-Reply-To: <CAKDXFkMvXJm5+5Qxz2N5NH-s+nptayG_7+yTSPxynZxkOcaVKw@mail.gmail.com> (Dotan Cohen's message of "Wed, 15 Dec 2021 11:50:44 +0200")

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.

  reply	other threads:[~2021-12-15 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  9:50 Git bug: Filter ignored when "--invert-grep" option is used Dotan Cohen
2021-12-15 22:08 ` Junio C Hamano [this message]
2021-12-16 14:54   ` Dotan Cohen
2021-12-16 19:42     ` Junio C Hamano
2021-12-17 16:48       ` René Scharfe
2021-12-17 18:16         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqzgp134i4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=dotancohen@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).