pager: stop using the_repository

Stop using `the_repository` in the "pager" subsystem by passing in a
repository when setting up the pager and when configuring it.

Adjust callers accordingly by using `the_repository`. While there may be
some callers that have a repository available in their context, this
trivial conversion allows for easier verification and bubbles up the use
of `the_repository` by one level.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-12-17 07:43:49 +01:00
committed by Junio C Hamano
parent 1f7e6478dc
commit 59b6131a67
11 changed files with 27 additions and 28 deletions

View File

@ -42,7 +42,7 @@ static char *sequence_editor(int ident_flag UNUSED)
static char *pager(int ident_flag UNUSED)
{
const char *pgm = git_pager(1);
const char *pgm = git_pager(the_repository, 1);
if (!pgm)
pgm = "cat";