threads / bug / 48037

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

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

## tl;dr

2 messages between Mar 13, 2018 and Mar 13, 2018.

replies: 1people: 2as markdown or json

Alexander Mills· Mar 13, 2018, 21:42 UTC · lore
$ 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?
-alex
-- 
Alexander D. Mills
! New cell phone number: (415)766-8243
alexander.d.mills@gmail.com

www.linkedin.com/pub/alexander-mills/b/7a5/418/
Ævar Arnfjörð Bjarmason· Mar 13, 2018, 21:57 UTC · re: Alexander Mills · lore

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

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

← back to recent threads