diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-12-17 07:43:49 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-12-18 10:44:30 -0800 |
| commit | 59b6131a677b0b45fb7fd54ba60dbf689b0a1797 (patch) | |
| tree | 990245a8aac2707520470276fa7f0e933f71d702 /builtin/grep.c | |
| parent | progress: stop using `the_repository` (diff) | |
| download | git-59b6131a677b0b45fb7fd54ba60dbf689b0a1797.tar.gz git-59b6131a677b0b45fb7fd54ba60dbf689b0a1797.zip | |
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>
Diffstat (limited to 'builtin/grep.c')
| -rw-r--r-- | builtin/grep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index d00ee76f24..d1427290f7 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -1084,7 +1084,7 @@ int cmd_grep(int argc, } if (show_in_pager == default_pager) - show_in_pager = git_pager(1); + show_in_pager = git_pager(the_repository, 1); if (show_in_pager) { opt.color = 0; opt.name_only = 1; @@ -1246,7 +1246,7 @@ int cmd_grep(int argc, } if (!show_in_pager && !opt.status_only) - setup_pager(); + setup_pager(the_repository); die_for_incompatible_opt3(!use_index, "--no-index", untracked, "--untracked", |
