From 28da6575e672ce17a69a2a538646fa1bf3a9c69f Mon Sep 17 00:00:00 2001 From: Squibid Date: Thu, 13 Nov 2025 20:37:00 -0500 Subject: [PATCH] slightly improve speed on large git repositories --- XD.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XD.c b/XD.c index c5af3cd..85b272e 100644 --- a/XD.c +++ b/XD.c @@ -197,9 +197,10 @@ has_untracked(git_repository *repo) int r = 0; /* FIXME: this is really slow in large git repos :( */ - opts.show = GIT_STATUS_SHOW_WORKDIR_ONLY; + opts.show = GIT_STATUS_SHOW_INDEX_AND_WORKDIR; opts.flags = GIT_STATUS_OPT_INCLUDE_UNTRACKED | GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX | + GIT_STATUS_OPT_UPDATE_INDEX | GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH; if (git_status_list_new(&list, repo, &opts) < 0) {