Re: [PATCH v5] revision.c: implement --max-count-oldest
On Sat, May 09, 2026 at 08:01:15PM +0900, Junio C Hamano wrote:
Show 23 quoted lines
> Mirko Faina <mroik@delayed.space> writes:
>
> > --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?