3 test_description
='tests for git branch --track'
7 test_expect_success
'setup' '
12 test_expect_success
'checkout --track -b creates a new tracking branch' '
13 git checkout --track -b branch1 master &&
14 test $(git rev-parse --abbrev-ref HEAD) = branch1 &&
15 test $(git config --get branch.branch1.remote) = . &&
16 test $(git config --get branch.branch1.merge) = refs/heads/master
19 test_expect_success
'checkout --track -b rejects an extra path argument' '
20 test_must_fail git checkout --track -b branch2 master one.t 2>err &&
21 test_i18ngrep "cannot be used with updating paths" err