git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Anthony Sottile <asottile@umich.edu>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: bug: `git log --grep ... --invert-grep --author=...` negates / ignores --author
Date: Thu, 01 Jun 2017 11:20:21 +0900	[thread overview]
Message-ID: <xmqqtw4078ka.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CACBZZX7OhdRM+Mhx4FVX-Upvq169ZLvArL5ZxcTgz8u=WRh3aw@mail.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Wed, 31 May 2017 20:08:54 +0200")

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> $ git log --grep=bar --invert-grep --author=Ævar --pretty=format:%an
> -100 origin/pu |sort|uniq -c|sort -nr
>      78 Junio C Hamano
>      14 Jeff King
>       2 Andreas Heiduk
>       1 Sahil Dua
>       1 Rikard Falkeborn
>       1 Johannes Sixt
>       1 Johannes Schindelin
>       1 Ben Peart
>       1 Ævar Arnfjörð Bjarmason
>
> That last command should only find my commits, but instead --author is
> discarded.

Hmph, the way I read revision.c::commit_match() is that we check
with "--grep=bar --author=Ævar" and then emit the commit if that
check fails when --invert-grep is in effect (instead of emitting the
commit when the check succeeds, which is the normal case).

So there is one commit that didn't pass "has 'bar' and written by
Ævar" check that was written by you in the recent past (iow,
recently you were writing bar all over the place).  Changes by other
people by definition does not pass "has 'bar' and written by Ævar"
check, on the other hand.



      parent reply	other threads:[~2017-06-01  2:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-31 15:45 bug: `git log --grep ... --invert-grep --author=...` negates / ignores --author Anthony Sottile
2017-05-31 18:08 ` Ævar Arnfjörð Bjarmason
2017-05-31 21:40   ` Jeff King
2017-06-01 19:45     ` Ævar Arnfjörð Bjarmason
2017-06-01 21:05       ` Anthony Sottile
2017-06-01 21:38       ` Junio C Hamano
2017-06-01  2:20   ` Junio C Hamano [this message]

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=xmqqtw4078ka.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=asottile@umich.edu \
    --cc=avarab@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).