From: Junio C Hamano Date: Wed, 26 Mar 2025 07:26:10 +0000 (+0900) Subject: Merge branch 'tb/refs-exclude-fixes' X-Git-Tag: v2.50.0-rc0~175 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=def5e32bc56617c8f43ddc17ee5785abf1b865d4;p=thirdparty%2Fgit.git Merge branch 'tb/refs-exclude-fixes' The refname exclusion logic in the packed-ref backend has been broken for some time, which confused upload-pack to advertise different set of refs. This has been corrected. * tb/refs-exclude-fixes: refs.c: stop matching non-directory prefixes in exclude patterns refs.c: remove empty '--exclude' patterns --- def5e32bc56617c8f43ddc17ee5785abf1b865d4 diff --cc t/t1419-exclude-refs.sh index c04eeb7211,11d6dfdb25..04797aee59 --- a/t/t1419-exclude-refs.sh +++ b/t/t1419-exclude-refs.sh @@@ -89,19 -93,20 +93,27 @@@ test_expect_success 'adjacent, non-over for_each_ref refs/heads/foo refs/heads/quux >expect && test_cmp expect actual && - assert_jumps 1 perf + case "$GIT_DEFAULT_REF_FORMAT" in + files) + assert_jumps 1 perf;; + reftable) + assert_jumps 2 perf;; + *) + BUG "unhandled ref format $GIT_DEFAULT_REF_FORMAT";; + esac ' - test_expect_success 'overlapping excluded regions' ' + test_expect_success 'non-directory excluded regions' ' for_each_ref__exclude refs/heads refs/heads/ba refs/heads/baz >actual 2>perf && - for_each_ref refs/heads/foo refs/heads/quux >expect && + for_each_ref refs/heads/bar refs/heads/foo refs/heads/quux >expect && + + test_cmp expect actual && + assert_jumps 1 perf + ' + + test_expect_success 'overlapping excluded regions' ' + for_each_ref__exclude refs/heads refs/heads/bar refs/heads/bar/4 >actual 2>perf && + for_each_ref refs/heads/baz refs/heads/foo refs/heads/quux >expect && test_cmp expect actual && assert_jumps 1 perf