summaryrefslogtreecommitdiff
path: root/t/t6300-for-each-ref.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2018-07-02 21:12:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-03 21:49:37 (GMT)
commite674eb2528229ac7f9c911369a39e7a979bfe75a (patch)
tree537ad6500413d2848c55163928826c4a664b021b /t/t6300-for-each-ref.sh
parent639ab5efa1ad79bd69abfd67bf28016db41c10d5 (diff)
downloadgit-e674eb2528229ac7f9c911369a39e7a979bfe75a.zip
git-e674eb2528229ac7f9c911369a39e7a979bfe75a.tar.gz
git-e674eb2528229ac7f9c911369a39e7a979bfe75a.tar.bz2
ref-filter: avoid backend filtering with --ignore-case
When for-each-ref is used with --ignore-case, we expect match_name_as_path() to do a case-insensitive match. But there's an extra layer of filtering that happens before we even get there. Since commit cfe004a5a9 (ref-filter: limit traversal to prefix, 2017-05-22), we feed the prefix to the ref backend so that it can optimize the ref iteration. There's no mechanism for us to tell the backend we're matching case-insensitively. Nor is there likely to be one anytime soon, since the packed backend relies on binary-searching the sorted list of refs. Let's just punt on this case. The extra filtering is an optimization that we simply can't do. We'll still give the correct answer via the filtering in match_name_as_path(). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6300-for-each-ref.sh')
-rwxr-xr-xt/t6300-for-each-ref.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 1adb958..3bb901d 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -795,7 +795,7 @@ test_expect_success ':remotename and :remoteref' '
)
'
-test_expect_failure 'for-each-ref --ignore-case ignores case' '
+test_expect_success 'for-each-ref --ignore-case ignores case' '
>expect &&
git for-each-ref --format="%(refname)" refs/heads/MASTER >actual &&
test_cmp expect actual &&