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 <sunsh...@sunshineco.com>
 t/t3010-ls-files-killed-modified.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/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

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to