]> git.scripts.mit.edu Git - git.git/commit
t1450: refactor ".", "..", and ".git" fsck tests
authorJeff King <peff@peff.net>
Mon, 24 Nov 2014 18:40:11 +0000 (13:40 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Dec 2014 19:04:39 +0000 (11:04 -0800)
commit450870cba7a9bac94b5527021800bd8bf037c99c
tree2e93b3afe16118e538d6aedaa717d999f487d04a
parentcc2fc7c2f07c4a2aba5a653137ac9b489e05df43
t1450: refactor ".", "..", and ".git" fsck tests

We check that fsck notices and complains about confusing
paths in trees. However, there are a few shortcomings:

  1. We check only for these paths as file entries, not as
     intermediate paths (so ".git" and not ".git/foo").

  2. We check "." and ".." together, so it is possible that
     we notice only one and not the other.

  3. We repeat a lot of boilerplate.

Let's use some loops to be more thorough in our testing, and
still end up with shorter code.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1450-fsck.sh