]> git.ipfire.org Git - thirdparty/git.git/commit
revision.c: implement --max-count-oldest
authorMirko Faina <mroik@delayed.space>
Tue, 19 May 2026 00:55:22 +0000 (02:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 21 May 2026 02:54:11 +0000 (11:54 +0900)
commit36cc971695e4a4ecfb514b305d191ee2cdbd9a02
tree695e7801df5f463f74406341fb0d7a747288f7fa
parent94f057755b7941b321fd11fec1b2e3ca5313a4e0
revision.c: implement --max-count-oldest

"--max-count" is a commit limiting option and 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 do
something like

    git log $(git rev-list HEAD | tail -n N | head -n 1)

This is not very user-friendly.

Teach get_revision() the --max-count-oldest option.

Signed-off-by: Mirko Faina <mroik@delayed.space>
[jc: fixed up t4202 <xmqq7boy4o05.fsf@gitster.g>]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/rev-list-options.adoc
revision.c
revision.h
t/t4202-log.sh