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

[PATCH 1/3] t6300: add a test for --ignore-case

From
Jeff King <peff@peff.net>
Date
Jul 2, 2018, 21:11 UTC
Message-ID
<20180702211122.GA23324@sigill.intra.peff.net>
In-Reply-To
<20180702211100.GA20885@sigill.intra.peff.net>

The --ignore-case option was added by 3bb16a8bf2 (tag, branch, for-each-ref: add --ignore-case for sorting and filtering, 2016-12-04), but it was never tested. And indeed, it does not work due to multiple bugs (which will be fixed in subsequent patches).

Signed-off-by: Jeff King <peff@peff.net>
---
 t/t6300-for-each-ref.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 48379aa0ee..b2bc81103f 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -795,4 +795,15 @@ test_expect_success ':remotename and :remoteref' '
 	)
 '
 
+test_expect_failure 'for-each-ref --ignore-case ignores case' '
+	>expect &&
+	git for-each-ref --format="%(refname)" refs/heads/MASTER >actual &&
+	test_cmp expect actual &&
+
+	echo refs/heads/master >expect &&
+	git for-each-ref --format="%(refname)" --ignore-case \
+		refs/heads/MASTER >actual &&
+	test_cmp expect actual
+'
+
 test_done
-- 
2.18.0.359.ge51c883f96
Previous: Jeff KingNext: Jeff King
Message 2 of 5 in “un-break for-each-ref --ignore-case”
  1. 0/3 un-break for-each-ref --ignore-caseJeff King, Jul 2, 2018
  2. 1/3 t6300: add a test for --ignore-caseJeff King, Jul 2, 2018
  3. 2/3 for-each-ref: consistently pass WM_IGNORECASE flagJeff King, Jul 2, 2018
  4. 3/3 ref-filter: avoid backend filtering with --ignore-caseJeff King, Jul 2, 2018
  5. Eric SunshineJul 2, 2018

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.