]> git.ipfire.org Git - thirdparty/git.git/commit - wt-status.h
wt-status: show sparse checkout status as well
authorElijah Newren <newren@gmail.com>
Thu, 18 Jun 2020 20:49:57 +0000 (20:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Jun 2020 21:12:28 +0000 (14:12 -0700)
commit051df3cfe8ed7d113197636f860edea14f283037
tree09a2af475e33e75965cd601f9bec3fedb1c8371e
parent101b3204f37606972b40fc17dec84560c22f69f6
wt-status: show sparse checkout status as well

Some of the early feedback of folks trying out sparse-checkouts at
$dayjob is that sparse checkouts can sometimes be disorienting; users
can forget that they had a sparse-checkout and then wonder where files
went.  Add some output to 'git status' in the form of a simple line that
states:

    You are in a sparse checkout with 35% of files present.

where, obviously, the exact figure changes depending on what percentage
of files from the index do not have the SKIP_WORKTREE bit set.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
wt-status.c
wt-status.h