Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2021-07-14 16:12:36 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-14 23:42:49 +0300
commitbf48e5acdbf25a98fd142d9c90157c10b427119a (patch)
treed293eb9bf8f7122fe3635714b3354f4b5e72afef /wt-status.h
parent9eb00af5627f1a04ca083128085ca6774fce0524 (diff)
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.h1
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;