]>
Commit | Line | Data |
---|---|---|
47c6ef1c JH |
1 | #!/bin/sh |
2 | ||
0e615b25 | 3 | test_description='fetch follows remote-tracking branches correctly' |
47c6ef1c | 4 | |
e75d2f7f | 5 | TEST_PASSES_SANITIZE_LEAK=true |
47c6ef1c JH |
6 | . ./test-lib.sh |
7 | ||
8 | test_expect_success setup ' | |
9 | >file && | |
10 | git add . && | |
11 | test_tick && | |
12 | git commit -m Initial && | |
13 | git branch b-0 && | |
14 | git branch b1 && | |
15 | git branch b/one && | |
16 | test_create_repo other && | |
17 | ( | |
18 | cd other && | |
19 | git config remote.origin.url .. && | |
20 | git config remote.origin.fetch "+refs/heads/b/*:refs/remotes/b/*" | |
21 | ) | |
22 | ' | |
23 | ||
24 | test_expect_success fetch ' | |
25 | ( | |
26 | cd other && git fetch origin && | |
27 | test "$(git for-each-ref --format="%(refname)")" = refs/remotes/b/one | |
28 | ) | |
29 | ' | |
30 | ||
31 | test_done |