]> Kevux Git Server - rit/commit
pretty.c: add %(count) and %(total) placeholders
authorMirko Faina <mroik@delayed.space>
Fri, 6 Mar 2026 23:34:40 +0000 (00:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 7 Mar 2026 01:16:44 +0000 (17:16 -0800)
commit9ccd9e6fcab2573a04b24f81d96cfdc355a7d51f
tree97ab1b0570ecedd57d60ef5d218a732639b3a0f6
parent67ad42147a7acc2af6074753ebd03d904476118f
pretty.c: add %(count) and %(total) placeholders

In many commands we can customize the output through the "--format" or
the "--pretty" options. This patch adds two new placeholders used mainly
when there's a range of commits that we want to show.

Currently these two placeholders are not usable as they're coupled with
the rev_info->nr and rev_info->total fields, fields that are used only
by the format-patch numbered email subjects.

Teach repo_format_commit_message() the %(count) and %(total)
placeholders.

Signed-off-by: Mirko Faina <mroik@delayed.space>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c