From: Eric Sunshine Date: Fri, 23 Aug 2013 20:29:18 GMT Subject: [PATCH v2 1/2] t3103: demonstrate dir.c:treat_one_path() core.ignorecase failure Message-ID: <1377289759-46838-2-git-send-email-sunshine@sunshineco.com> In-Reply-To: <1377289759-46838-1-git-send-email-sunshine@sunshineco.com> 2eac2a4cc4bdc8d7 (ls-files -k: a directory only can be killed if the index has a non-directory; 2013-08-15) adds a caller of directory_exists_in_index(dirname,len) which forgets to satisfy the undocumented requirement that a '/' must be present at dirname[len] (despite being past the end-of-string). This oversight leads to incorrect behavior when core.ignorecase is true. Demonstrate this. Signed-off-by: Eric Sunshine --- t/t3010-ls-files-killed-modified.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh index 3120efd..198d308 100755 --- a/t/t3010-ls-files-killed-modified.sh +++ b/t/t3010-ls-files-killed-modified.sh @@ -103,6 +103,14 @@ test_expect_success 'validate git ls-files -k output.' ' test_cmp .expected .output ' +test_expect_success 'git ls-files -k to show killed files (icase).' ' + git -c core.ignorecase=true ls-files -k >.output +' + +test_expect_failure 'validate git ls-files -k output (icase).' ' + test_cmp .expected .output +' + test_expect_success 'git ls-files -m to show modified files.' ' git ls-files -m >.output ' -- 1.8.4.rc4.557.g46c5bb2