aboutsummaryrefslogtreecommitdiff
path: root/t/t3010-ls-files-killed-modified.sh
diff options
context:
space:
mode:
authorEric Sunshine <sunshine@sunshineco.com>2013-08-23 16:26:59 -0700
committerJunio C Hamano <gitster@pobox.com>2013-08-23 16:26:59 -0700
commit680be044d98b3b703bc33d546a987c19b3779aeb (patch)
treef9387cfa9f21d5d237be3b151dc18b1504a7d27e /t/t3010-ls-files-killed-modified.sh
parent3c56875176390eee7d81795294124ce90189d876 (diff)
downloadgit-680be044d98b3b703bc33d546a987c19b3779aeb.tar.gz
git-680be044d98b3b703bc33d546a987c19b3779aeb.tar.xz
dir.c::test_one_path(): work around directory_exists_in_index_icase() breakage
directory_exists_in_index() takes pathname and its length, but its helper function directory_exists_in_index_icase() reads one byte beyond the end of the pathname and expects there to be a '/'. This needs to be fixed, as that one-byte-beyond-the-end location may not even be readable, possibly by not registering directories to name hashes with trailing slashes. In the meantime, update the new caller added recently to treat_one_path() to make sure that the path buffer it gives the function is one byte longer than the path it is asking the function about by appending a slash to it. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3010-ls-files-killed-modified.sh')
-rwxr-xr-xt/t3010-ls-files-killed-modified.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh
index 6ea7ca826..ab1deae3b 100755
--- a/t/t3010-ls-files-killed-modified.sh
+++ b/t/t3010-ls-files-killed-modified.sh
@@ -78,9 +78,6 @@ date >path7
touch path10
>pathx/ju/nk
-test_expect_success \
- 'git ls-files -k to show killed files.' \
- 'git ls-files -k >.output'
cat >.expected <<EOF
path0/file0
path1/file1
@@ -89,9 +86,15 @@ path3
pathx/ju/nk
EOF
-test_expect_success \
- 'validate git ls-files -k output.' \
- 'test_cmp .expected .output'
+test_expect_success 'git ls-files -k to show killed files (w/o icase)' '
+ git ls-files -k >.output &&
+ test_cmp .expected .output
+'
+
+test_expect_success 'git ls-files -k to show killed files (w/ icase)' '
+ git -c core.ignorecase=true ls-files -k >.output &&
+ test_cmp .expected .output
+'
test_expect_success \
'git ls-files -m to show modified files.' \