3 test_description
='avoiding conflicting update through symref aliasing'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'setup' '
14 ( cd src && git pull )
17 test_expect_success
'push' '
20 git push ../dst1 "refs/remotes/*:refs/remotes/*"
22 git ls-remote src "refs/remotes/*" >expect &&
23 git ls-remote dst1 "refs/remotes/*" >actual &&
24 test_cmp expect actual &&
25 ( cd src && git symbolic-ref refs/remotes/origin/HEAD ) >expect &&
26 ( cd dst1 && git symbolic-ref refs/remotes/origin/HEAD ) >actual &&
27 test_cmp expect actual
30 test_expect_success
'fetch' '
33 git fetch ../src "refs/remotes/*:refs/remotes/*"
35 git ls-remote src "refs/remotes/*" >expect &&
36 git ls-remote dst2 "refs/remotes/*" >actual &&
37 test_cmp expect actual &&
38 ( cd src && git symbolic-ref refs/remotes/origin/HEAD ) >expect &&
39 ( cd dst2 && git symbolic-ref refs/remotes/origin/HEAD ) >actual &&
40 test_cmp expect actual