3 test_description='fetch follows remote-tracking branches correctly'
7 test_expect_success setup '
11 git commit -m Initial &&
15 test_create_repo other &&
18 git config remote.origin.url .. &&
19 git config remote.origin.fetch "+refs/heads/b/*:refs/remotes/b/*"
23 test_expect_success fetch '
25 cd other && git fetch origin &&
26 test "$(git for-each-ref --format="%(refname)")" = refs/remotes/b/one
31 236e830928a4295f5473416501dd777933bb778e branch 'master' of .
34 test_expect_success 'fetch default' '
35 test_when_finished "rm -rf another" &&
38 test_create_repo another &&
40 git remote add origin .. &&
44 git checkout -t -b local-tracking master &&
46 test_cmp ../expected .git/FETCH_HEAD
50 9d34b142e42f6b3dbab46dd4b9bc515e0ab16101 not-for-merge branch 'b-0' of ..
51 9d34b142e42f6b3dbab46dd4b9bc515e0ab16101 not-for-merge branch 'b/one' of ..
52 9d34b142e42f6b3dbab46dd4b9bc515e0ab16101 not-for-merge branch 'b1' of ..
53 9d34b142e42f6b3dbab46dd4b9bc515e0ab16101 not-for-merge branch 'master' of ..
56 test_expect_success 'fetch default simple' '
57 test_when_finished "rm -rf another" &&
60 test_create_repo another &&
62 git config fetch.default simple &&
63 git remote add origin .. &&
67 git checkout -t -b local-tracking master &&
69 test_cmp ../expected .git/FETCH_HEAD