diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2021-07-14 15:12:36 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-14 22:42:49 +0200 |
commit | bf48e5acdbf25a98fd142d9c90157c10b427119a (patch) | |
tree | d293eb9bf8f7122fe3635714b3354f4b5e72afef /wt-status.h | |
parent | diff-lib: handle index diffs with sparse dirs (diff) | |
download | git-bf48e5acdbf25a98fd142d9c90157c10b427119a.tar.xz git-bf48e5acdbf25a98fd142d9c90157c10b427119a.zip |
status: skip sparse-checkout percentage with sparse-index
'git status' began reporting a percentage of populated paths when
sparse-checkout is enabled in 051df3cf (wt-status: show sparse
checkout status as well, 2020-07-18). This percentage is incorrect when
the index has sparse directories. It would also be expensive to
calculate as we would need to parse trees to count the total number of
possible paths.
Avoid the expensive computation by simplifying the output to only report
that a sparse checkout exists, without the percentage.
This change is the reason we use 'git status --porcelain=v2' in
t1092-sparse-checkout-compatibility.sh. We don't want to ensure that
this message is equal across both modes, but instead just the important
information about staged, modified, and untracked files are compared.
Reviewed-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wt-status.h')
-rw-r--r-- | wt-status.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wt-status.h b/wt-status.h index 0d32799b28..ab9cc9d8f0 100644 --- a/wt-status.h +++ b/wt-status.h @@ -78,6 +78,7 @@ enum wt_status_format { }; #define SPARSE_CHECKOUT_DISABLED -1 +#define SPARSE_CHECKOUT_SPARSE_INDEX -2 struct wt_status_state { int merge_in_progress; |