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

Re: [PATCH] git-log: added --invert-grep option

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 29, 2014, 17:56 UTC
Message-ID
<xmqqy4pqz6fc.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1419390196-17222-1-git-send-email-ottxor@gentoo.org>
Christoph Junghans <ottxor@gentoo.org> writes:
> Ok, I drafted a first version of the suggest --grep-begin ...
> --grep-end syntax.
I am somewhat surprised that it was doable that cleanly.

The syntax, as I already said, is a bit too ugly to live in that form I suggested, though ;-).

> However, I could not find a good ways to invert the match on a commit
> basis instead of the normal line-wise version.
Good point.

The only interface to tweak the way the individual matches are turned into file-level match (by default, we say "any one of the clauses match, we find the file to be interesting") is "--all-match" ("all of the clauses have to trigger at least once for us to find the file interesting"), which, compared to the richer set of boolean operations at the line level, is a kludge.

Offhand, short of overhauling that kludge to allow us to express "The file has to have either 'atomic' or 'all-or-none' appear somewhere, and also cannot have 'wip' anywhere", I do not think of a good way, other than adding yet another kludge on top of the "--all-match" that says "none of the clauses must trigger" to express what you want to see happen in "git log" to exclude ones that are marked with "wip", perhaps naming it "--none-match" or something.

Thanks.
Previous: Christoph JunghansNext: Christoph Junghans
Message 5 of 15 in “git-log: added --invert-grep option”
  1. git-log: added --invert-grep optionChristoph Junghans, Dec 19, 2014
  2. Junio C HamanoDec 19, 2014
  3. Christoph JunghansDec 24, 2014
  4. git-log: added --grep-begin .. --grep-end syntaxChristoph Junghans, Dec 24, 2014
  5. Junio C HamanoDec 29, 2014
  6. git-log: added --none-match optionChristoph Junghans, Jan 4, 2015
  7. Junio C HamanoJan 6, 2015
  8. Christoph JunghansJan 9, 2015
  9. Junio C HamanoJan 9, 2015
  10. Junio C HamanoJan 12, 2015
  11. git-log: added --none-match optionChristoph Junghans, Jan 12, 2015
  12. log: teach --invert-grep optionChristoph Junghans, Jan 13, 2015
  13. Junio C HamanoJan 13, 2015
  14. gitk: pass --invert-grep option down to "git log"Junio C Hamano, Feb 16, 2015
  15. Paul MackerrasMar 22, 2015

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.