]> git.ipfire.org Git - thirdparty/git.git/commit
wt-status: provide function to expose status for trees
authorPatrick Steinhardt <ps@pks.im>
Wed, 7 Jan 2026 10:10:13 +0000 (11:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 8 Jan 2026 02:01:59 +0000 (11:01 +0900)
commite90167c783bdf2b062862bb027c480814947440d
treebdcfed0f616809d6e92f5bc498cacaa1fac4b2dc
parent173e64f5532407d204655558309e74bb0a5d7da5
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