]> git.ipfire.org Git - thirdparty/git.git/commit
t7063: more thorough status checking
authorElijah Newren <newren@gmail.com>
Wed, 1 Apr 2020 04:17:35 +0000 (04:17 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Apr 2020 18:10:38 +0000 (11:10 -0700)
commitce5c61a3f52b48497898dbe4e535e725b1c45794
tree505d399bbec408adea68a1a53e9712dc3dab29b8
parent0822e66b5d49d0de1aa767b38785e42de05eaf40
t7063: more thorough status checking

It turns out the t7063 has some testcases that even without using the
untracked cache cover situations that nothing else in the testsuite
handles.  Checking the results of
  git status --porcelain
both with and without the untracked cache, and comparing both against
our expected results helped uncover a critical bug in some dir.c
restructuring.

Unfortunately, it's not easy to run status and tell it to ignore the
untracked cache; the only knob we have is core.untrackedCache=false,
which is used to instruct git to *delete* the untracked cache (which
might also ignore the untracked cache when it operates, but that isn't
specified in the docs).

Create a simple helper that will create a clone of the index that is
missing the untracked cache bits, and use it to compare that the results
with the untracked cache match the results we get without the untracked
cache.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7063-status-untracked-cache.sh