3 test_description
='remote tracking stats'
14 test_expect_success setup
'
22 git checkout -b b1 origin &&
23 git reset --hard HEAD^ &&
25 git checkout -b b2 origin &&
26 git reset --hard b1 &&
27 git checkout -b b3 origin &&
28 git reset --hard HEAD^ &&
29 git checkout -b b4 origin &&
35 script='s/^..\(b.\)[ 0-9a-f]*\[\([^]]*\)\].*/\1 \2/p'
43 test_expect_success
'branch -v' '
48 sed -n -e "$script" >actual &&
49 test_cmp expect actual
52 test_expect_success
'checkout' '
54 cd test && git checkout b1
56 grep "have 1 and 1 different" actual
59 test_expect_success
'status' '
62 git checkout b1 >/dev/null &&
63 # reports nothing to commit
64 test_must_fail git status
66 grep "have 1 and 1 different" actual
69 test_expect_success
'status when tracking lightweight tags' '
70 git checkout master &&
72 git branch --track lighttrack light >actual &&
73 grep "set up to track" actual &&
74 git checkout lighttrack
77 test_expect_success
'status when tracking annotated tags' '
78 git checkout master &&
79 git tag -m heavy heavy &&
80 git branch --track heavytrack heavy >actual &&
81 grep "set up to track" actual &&
82 git checkout heavytrack