git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 23, 2013, 17:21 UTC
Message-ID
<xmqqfvu0pbkt.fsf@gitster.dls.corp.google.com>
In-Reply-To
<1377232155-7300-2-git-send-email-sunshine@sunshineco.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 17 quoted lines
> @@ -21,4 +22,18 @@ test_expect_success 'ls-tree fails with non-zero exit code on broken tree' '
>  	test_must_fail git ls-tree -r HEAD
>  '
>  
> +test_expect_failure 'ls-tree directory core.ignorecase' '
> +	cat >expect <<-\EOF &&
> +	d/e/f
> +	EOF
> +	mkdir d &&
> +	>d/e &&
> +	git update-index --add -- d/e &&
> +	rm d/e &&
> +	mkdir d/e &&
> +	>d/e/f &&
> +	git -c core.ignorecase=true ls-files -k >actual &&
> +	test_cmp expect actual
> +'

Hmm. Wouldn't it be a clearer demonstration to add to t3010 another invocation of "ls-files -k" that was added by 3c568751 (t3010: update to demonstrate "ls-files -k" optimization pitfalls, 2013-08-15) but with core.ignorecase=true? Something like...

 t/t3010-ls-files-killed-modified.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/t/t3010-ls-files-killed-modified.sh b/t/t3010-ls-files-killed-modified.sh
index 6ea7ca8..f4783ed 100755
--- a/t/t3010-ls-files-killed-modified.sh
+++ b/t/t3010-ls-files-killed-modified.sh
@@ -90,6 +90,17 @@ pathx/ju/nk
 EOF
 
 test_expect_success \
+    'git ls-files -k to show killed files (with icase)' \
+    'git -c core.ignorecase=true ls-files -k >.output'
+cat >.expected <<EOF
+path0/file0
+path1/file1
+path2
+path3
+pathx/ju/nk
+EOF
+
+test_expect_success \
     'validate git ls-files -k output.' \
     'test_cmp .expected .output'
 
Previous: Eric SunshineNext: Eric Sunshine
Message 3 of 7 in “fix t3010 failure when core.ignorecase=true”
  1. 0/2 fix t3010 failure when core.ignorecase=trueEric Sunshine, Aug 23, 2013
  2. 1/2 t3103: demonstrate dir.c:treat_one_path() core.ignorecase failureEric Sunshine, Aug 23, 2013
  3. Junio C HamanoAug 23, 2013
  4. 2/2 dir: test_one_path: fix inconsistent behavior due to missing '/'Eric Sunshine, Aug 23, 2013
  5. Jonathan NiederAug 25, 2013
  6. Eric SunshineAug 25, 2013
  7. Junio C HamanoAug 26, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.