Subject: Re: [PATCH v5] revision.c: implement --max-count-oldest

From: Junio C Hamano <[email-masked]>
Date: Sat, 09 May 2026 20:01:15 +0900

Mirko Faina <[email-masked]> 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?