Thread View: linux.kernel.git
1 messages
1 total messages
Started by Okhuomon Ajayi
Sun, 01 Nov 2026 06:39
[Outreachy PATCH] wt-status: use the repository the status already has
Author: Okhuomon Ajayi
Date: Sun, 01 Nov 2026 06:39
Date: Sun, 01 Nov 2026 06:39
42 lines
11971 bytes
11971 bytes
wt_longstatus_print_verbose() sets up the work tree of the_repository,
even though its wt_status already names the repository in s->repo.
wt_status_check_sparse_checkout() receives a repository, but reads
the sparse-checkout setting from the_repository.
Use s->repo and r instead.
Keep USE_THE_REPOSITORY_VARIABLE because DEFAULT_ABBREV, which is
still used in this file, expands to the global default_abbrev.
Signed-off-by: Okhuomon Ajayi <okhuomonajayi54@gmail.com>
---
wt-status.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index 238bb48643..5bd1ecee10 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -1208,7 +1208,7 @@ static void wt_longstatus_print_verbose(struct wt_status *s)
status_printf_ln(s, c,
"--------------------------------------------------");
status_printf_ln(s, c, _("Changes not staged for commit:"));
- setup_work_tree(the_repository);
+ setup_work_tree(s->repo);
rev.diffopt.a_prefix = "i/";
rev.diffopt.b_prefix = "w/";
run_diff_files(&rev, 0);
@@ -1895,7 +1895,7 @@ static void wt_status_check_sparse_checkout(struct repository *r,
{
int skip_worktree = 0;
int i;
- struct repo_config_values *cfg = repo_config_values(the_repository);
+ struct repo_config_values *cfg = repo_config_values(r);
if (!cfg->apply_sparse_checkout ||
r->index->cache_nr == 0) {
base-commit: 50fe5cc63f9cd6e89b87a2c9ccf96a444f4cfdb7
--
2.56.0
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads