git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Per Cederqvist <cederp@opera.com>
Cc: git@vger.kernel.org
Subject: Re: git log: invert --author and --committer
Date: Mon, 23 May 2016 14:47:10 -0700	[thread overview]
Message-ID: <xmqqshx878gx.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAP=KgsSNgKY5gR3uSSMZdOxZ1687YRnQRQFsV22UwCXqmdfB9g@mail.gmail.com> (Per Cederqvist's message of "Mon, 23 May 2016 23:21:32 +0200")

Per Cederqvist <cederp@opera.com> writes:

> I think it does make sense to document this with the --author/--committer
> options.
>
> That wording would however make me assume that --all-match could also
> be used, so that
>
>     git log --all-match --author ceder --author cibot
>
> would list nothing (since there are no authors that match both
> "ceder" and "cibot" in this codebase).  That isn't the fact, though.
> It seems to list all commits that have either ceder or cibot as author,
> just as if I had not used --all-match.
>
> As a reader of the man-page, I would prefer to have the exact list
> of options in the documentation.  (I realize that it will make it harder
> to maintain.)
>
>     /ceder

Ok, take 2.

This makes `--all-match` the only one that explicitly mentions that
the option applies to patterns given with the `--grep` option; from
an end-user's point of view, --author/--committer is not given via
the `--grep` option, so it may help to alleviate the above issue.

All others use "limiting patterns" consistently, so that eyeballing
for the phrase would catch things like "--invert-grep", "-E", etc.
and it would be easier to keep future additions to conform to the
convention, hopefully.

 Documentation/rev-list-options.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/rev-list-options.txt b/Documentation/rev-list-options.txt
index 4f009d4..51ead72 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -44,6 +44,10 @@ endif::git-rev-list[]
 	expression).  With more than one `--author=<pattern>`,
 	commits whose author matches any of the given patterns are
 	chosen (similarly for multiple `--committer=<pattern>`).
++
+Options that affect how a limiting pattern matches (listed below,
+such as `-i`, `-E`, `--invert-grep`) can also be used to affect
+these options.
 
 --grep-reflog=<pattern>::
 	Limit the commits output to ones with reflog entries that
@@ -70,7 +74,7 @@ endif::git-rev-list[]
 
 --invert-grep::
 	Limit the commits output to ones with log message that do not
-	match the pattern specified with `--grep=<pattern>`.
+	match the regular expression limiting patterns.
 
 -i::
 --regexp-ignore-case::

      parent reply	other threads:[~2016-05-23 21:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23  9:54 git log: invert --author and --committer Per Cederqvist
2016-05-23 17:11 ` Junio C Hamano
2016-05-23 19:26   ` Junio C Hamano
2016-05-23 21:21     ` Per Cederqvist
2016-05-23 21:26       ` Junio C Hamano
2016-05-23 21:47       ` 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=xmqqshx878gx.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=cederp@opera.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).