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

Re: Git bug: Filter ignored when "--invert-grep" option is used.

From
DCDotan Cohen <dotancohen@gmail.com>
Date
Dec 16, 2021, 14:54 UTC
Message-ID
<CAKDXFkOXNPTjQRvj7sy54YhH1QGFUsEXYeLKCShJP7_xueRseQ@mail.gmail.com>
In-Reply-To
<xmqqzgp134i4.fsf@gitster.g>
> 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.

Possibly, but the flag is called --invert-grep not --invert-matches so one would expect it to revert grep only. Though behaviour contrary to user expectations is not an unusual property of git :)

Other than piping to e.g. awk or worse, how would one get the commits by a particular author that do not have a specific string in the commit message? Prettying to oneline would make the piping easier to at least get the commit ids, but I'd like to see the whole commit message and affected files.

Thanks, Junio.
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 6 in “Git bug: Filter ignored when "--invert-grep" option is used.”
  1. Dotan CohenDec 15, 2021
  2. Junio C HamanoDec 15, 2021
  3. Dotan CohenDec 16, 2021
  4. Junio C HamanoDec 16, 2021
  5. René ScharfeDec 17, 2021
  6. Junio C HamanoDec 17, 2021

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.