49d0fe44fbce0a1d21b773ec8b565763de5a8206
3 test_description
='git receive-pack with alternate ref filtering'
7 test_expect_success
'setup' '
9 git clone -s --bare . fork &&
10 git checkout -b public/branch master &&
12 git checkout -b private/branch master &&
17 depacketize | perl
-lne
'/^(\S+) \.have/ and print $1'
20 test_expect_success
'with core.alternateRefsCommand' '
21 write_script fork/alternate-refs <<-\EOF &&
22 git --git-dir="$1" for-each-ref \
23 --format="%(objectname)" \
26 test_config -C fork core.alternateRefsCommand alternate-refs &&
27 git rev-parse public/branch >expect &&
28 printf "0000" | git receive-pack fork >actual &&
29 extract_haves <actual >actual.haves &&
30 test_cmp expect actual.haves