]> git.ipfire.org Git - thirdparty/git.git/commit
wt-status: provide function to expose status for trees
authorPatrick Steinhardt <ps@pks.im>
Tue, 13 Jan 2026 09:54:37 +0000 (10:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Jan 2026 13:41:16 +0000 (05:41 -0800)
commit475ade1cd6e8ff07495b4b5871a69f7b385259f7
tree14b226e9d732aff3b93500836e11d0444447c6c4
parent48a72f61f04cb2357544f373677acd5b4149237e
wt-status: provide function to expose status for trees

The "wt-status" subsystem is responsible for printing status information
around the current state of the working tree. This most importantly
includes information around whether the working tree or the index have
any changes.

We're about to introduce a new command where the changes in neither of
them are actually relevant to us. Instead, what we want is to format the
changes between two different trees. While it is a little bit of a
stretch to add this as functionality to _working tree_ status, it
doesn't make any sense to open-code this functionality, either.

Implement a new function `wt_status_collect_changes_trees()` that diffs
two trees and formats the status accordingly. This function is not yet
used, but will be in a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c
wt-status.h