]> git.ipfire.org Git - thirdparty/git.git/commit
wt-status: pass struct repository through function parameters
authorShreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Wed, 18 Feb 2026 17:53:40 +0000 (23:23 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Feb 2026 16:59:23 +0000 (08:59 -0800)
commit4631e22f925fa2af8d8548af97ee2215be101409
tree5dc5f860d887dd9dab319f64b4d645df50fff951
parent67ad42147a7acc2af6074753ebd03d904476118f
wt-status: pass struct repository through function parameters

Some functions in wt-status.c (count_stash_entries(),
read_line_from_git_path(), abbrev_oid_in_line(), and
read_rebase_todolist()) rely on the_repository as they do not have access
to a local repository instance.

Add a struct repository *r parameter to these functions and pass the local
repository instance through the callers, which already have access to it
either directly by struct repository *r or indirectly by struct wt_state
*s (s->repo).

Replace uses of the_repository in these functions with the passed parameter.

Signed-off-by: Shreyansh Paliwal <shreyanshpaliwalcmsmn@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c