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

Re: git-log bug: --grep and -number args are at odds

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Mar 13, 2018, 21:57 UTC
Message-ID
<871sgnfxku.fsf@evledraar.gmail.com>
In-Reply-To
<CA+KyZp6QZ4BmOtLFiByjmZ4NsZyDBFsqme64aT5ER-QpgD49pg@mail.gmail.com>
On Tue, Mar 13 2018, Alexander Mills jotted:
Show 5 quoted lines
> $ git log -50   ###  I get 50 results
>
> $ git log -50 --grep="*"   ### I get a lot more than 50...
>
> shouldn't `-50` minimize the results length to 50 or fewer?

On what git version? On my 2.16.2.804.g6dcf76e118 on git.git this works as expected:

    $ git -c grep.patternType=basic log --oneline -50 --grep="*" |wc -l
    50
    $ git -c grep.patternType=basic log --oneline -50 | wc -l
    50
Previous: Alexander Mills
Message 2 of 2 in “git-log bug: --grep and -number args are at odds”
  1. Alexander MillsMar 13, 2018
  2. Ævar Arnfjörð BjarmasonMar 13, 2018

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.