| test_description='remote tracking stats' |
| test_expect_success setup ' |
| git checkout -b b1 origin && |
| git reset --hard HEAD^ && |
| git checkout -b b2 origin && |
| git checkout -b b3 origin && |
| git reset --hard HEAD^ && |
| git checkout -b b4 origin && |
| script='s/^..\(b.\)[ 0-9a-f]*\[\([^]]*\)\].*/\1 \2/p' |
| test_expect_success 'branch -v' ' |
| sed -n -e "$script" >actual && |
| test_expect_success 'checkout' ' |
| cd test && git checkout b1 |
| grep -e "have 1 and 1 different" actual |
| test_expect_success 'status' ' |
| git checkout b1 >/dev/null && |
| # reports nothing to commit |
| test_must_fail git status |
| grep -e "have 1 and 1 different" actual |