Re: [PATCH v5] revision.c: implement --max-count-oldest
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 9, 2026, 11:01 UTC
- Message-ID
- <xmqqjytcdeys.fsf@gitster.g>
- In-Reply-To
- <2f71a00b035e25b971641b77a6fa7626f1e2459c.1777578676.git.mroik@delayed.space>
Mirko Faina <mroik@delayed.space> writes:
Show 11 quoted lines
> --max-count is a commit limiting option sets a maximum amount of commits > to be shown. If a user wants to see only the first N commits of the > history (the oldest commits) they'd have to combine --max-count with > --skip. This is not very user-friendly. > ... > +test_expect_success 'log --max-count-oldest=3 --reverse --oneline' ' > + test_when_finished rm expect && > + git log --oneline | tail -n3 | tac >expect && > + git log --oneline --max-count-oldest=3 --reverse >actual && > + test_cmp expect actual > +'
"tac" is not portable, and breaks macOS CI jobs.
https://github.com/git/git/actions/runs/25591146540/job/75128929633#step:4:2058
Wouldn't
git log --oneline --reverse | head -n3 >expect
be equivalent?