utf8: fix overflow when returning string width
[alt-git.git] / t / t2027-checkout-track.sh
blobbcba1bf90c090a00e7e734aac4cb5a2d55ed1f66
1 #!/bin/sh
3 test_description='tests for git branch --track'
5 . ./test-lib.sh
7 test_expect_success 'setup' '
8 test_commit one &&
9 test_commit two
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
24 test_done