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

Re: Supporting "-v" option for git-log

From
ELElazar Leibovich <elazarl@gmail.com>
Date
May 25, 2011, 11:28 UTC
Message-ID
<BANLkTikT4s+Twfip2g7Zo-XcML1Wbd3qBg@mail.gmail.com>
In-Reply-To
<SNT124-W5207D5461CD80509763B79C4740@phx.gbl>
On Wed, May 25, 2011 at 2:21 PM, Tim Mazid <timmazid@hotmail.com> wrote:
>
> Well, personally, I've never used the --grep option. I pipe it through
> grep, where I can supply options such as -v.

But then you must use single-line commits output. Which is inconvenient if you want to read all the commit message.

Show 7 quoted lines
> However, if the --grep
> option already exists, then it does make sense to allow users to use
> options they would normally be able to with grep.
>
> As for the syntax, that seems like a good idea on the surface, but
> how would you go about supporting other grep options? Such as
> "-i"?

Now that I think of it, we already have the '--not' option for revision specifiers. Why won't we use it for grep patterns? That way -v will not be overloaded (it usually means verbose). For example

    git log --all --not --grep A --grep B

Would mean find all commits without A and with B, in SQL "SELECT * FROM COMMITS WHERE message NOT LIKE '%A%' AND message LIKE '%B%'".

Previous: Tim MazidNext: Tim Mazid
Message 6 of 14 in “Supporting "-v" option for git-log”
  1. Elazar LeibovichMay 25, 2011
  2. Tim MazidMay 25, 2011
  3. Elazar LeibovichMay 25, 2011
  4. Tim MazidMay 25, 2011
  5. Tim MazidMay 25, 2011
  6. Elazar LeibovichMay 25, 2011
  7. Tim MazidMay 25, 2011
  8. Elazar LeibovichMay 25, 2011
  9. Jeff KingMay 25, 2011
  10. Jakub NarebskiMay 25, 2011
  11. Jeff KingMay 25, 2011
  12. Jakub NarebskiMay 25, 2011
  13. Junio C HamanoMay 25, 2011
  14. Jeff KingMay 25, 2011

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.