Thread (1 message) 1 message, 1 author, 2016-06-16

Re: git log: invert --author and --committer

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:19:33

Per Cederqvist [off-list ref] writes:
We have a repository that mostly contains configuration data.
This is updated by our continuous integration build system, but
every once in a while there are also more interesting commits
made by humans.

For several years I have suffered in silence, wishing for a way
to do something like

    git log --author-not cibot

Today a friend told me that you can actually list all commits
except those made by cibot with this commandline:

    git log --invert-grep --author cibot

The documentation for --invert-grep should mention that it
also inverts the meaning of --author and --committer.  Perphaps
something like this would make sense?

    /ceder
Yeah, the author/committer search piggy-backs the more generic "grep
in the log" machinery, but it is quite hidden and the document
failed to tell the end users that is what is going on.  Mentioning
that invert (or any tweak that works on the grep machinery) affects
author/committer search is a good idea.

Does "-i/--regexp-ignore-case" also need the same treatment?
quoted hunk
diff --git a/Documentation/rev-list-options.txt
b/Documentation/rev-list-options.txt
index 4f009d4..ae12687 100644
--- a/Documentation/rev-list-options.txt
+++ b/Documentation/rev-list-options.txt
@@ -70,7 +70,8 @@ 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 pattern specified with `--grep=<pattern>`.  Also
+ affects `--author=<pattern>` and `--committer=<pattern>`.

 -i::
 --regexp-ignore-case::
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help