Thread (3 messages) flat view 3 messages, 1 author, 2016-06-15
DORMANTno replies

Revision v2 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 1/2] t3103: demonstrate dir.c:treat_one_path() core.ignorecase failure

From: Eric Sunshine <hidden>
Date: 2016-06-15 22:58:29
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help