git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git log: invert --author and --committer

From
Per Cederqvist <cederp@opera.com>
Date
May 23, 2016, 09:54 UTC
Message-ID
<CAP=KgsSdX3pCRzeUVobrFWVGOGGSrwkO0MjFhUWruiajAxn38Q@mail.gmail.com>

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
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::
Next: Junio C Hamano
Message 1 of 6 in “git log: invert --author and --committer”
  1. Per CederqvistMay 23, 2016
  2. Junio C HamanoMay 23, 2016
  3. Junio C HamanoMay 23, 2016
  4. Per CederqvistMay 23, 2016
  5. Junio C HamanoMay 23, 2016
  6. Junio C HamanoMay 23, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.