Skip to content

pr-985/TaoK/taok-untracked-cache-with-uall-v6

Make it possible for users of the -uall flag to git status, either by
preference or by need (eg UI tooling), to benefit from the untracked cache
when they set their 'status.showuntrackedfiles' config setting to 'all'.
This is especially useful for large repos in Windows, where without
untracked cache "git status" times can easily be 5x higher, and GUI tooling
typically does use -uall.

In this sixth version, clarify the main commit message and some of the code
comments, and adjust the logic slightly such that an existing untracked
cache structure, when consistent with the requested flags in the current
run, can be reused even though the current config would set/store/use the
other set of flags on a new untracked cache structure.

I'm comfortable with this patch as-is, but am still interested in any
thoughts as to whether it makes sense and is likely to be accepted to do
this as a simple enhancement as proposed here, or whether people be more
comfortable with a new configuration option, given the potential for worse
performance under specific (and, I believe, vanishingly rare) circumstances.

Tao Klerks (2):
  untracked-cache: test untracked-cache-bypassing behavior with -uall
  untracked-cache: support '--untracked-files=all' if configured

 dir.c                             |  88 ++++++++++++++++++-----
 t/t7063-status-untracked-cache.sh | 113 ++++++++++++++++++++++++++++++
 2 files changed, 185 insertions(+), 16 deletions(-)

base-commit: 805e0a68082a217f0112db9ee86a022227a9c81b

Submitted-As: https://lore.kernel.org/git/pull.985.v6.git.1648742535.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.985.git.1624430668741.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.985.v2.git.1645811564461.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.985.v3.git.1645960973798.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.985.v4.git.1645974782256.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.985.v5.git.1648553134.gitgitgadget@gmail.com
Assets 2