3 test_description
='tg -C used multiple times works properly'
11 test_expect_success
'test setup' '
12 test_create_repo refs &&
13 test_create_repo heads &&
14 git -C refs config topgit.top-bases refs &&
15 git -C heads config topgit.top-bases heads &&
16 test "$(cd refs && git config topgit.top-bases)" = "refs" &&
17 test "$(cd heads && git config topgit.top-bases)" = "heads" &&
26 test_expect_success
'tg -C gets to refs' '
27 match_str "refs/top-bases" "$(tg -C refs --top-bases)" &&
29 match_str "refs/top-bases" "$(tg -C dir -C .. -C ../refs --top-bases)"
32 test_expect_success
'tg -C gets to heads' '
33 match_str "refs/heads/{top-bases}" "$(tg -C heads --top-bases)" &&
35 match_str "refs/heads/{top-bases}" "$(tg -C dir -C .. -C ../heads --top-bases)"