| test_description='git branch display tests' |
| test_expect_success 'make commits' ' |
| test_expect_success 'make branches' ' |
| git branch branch-two HEAD^ |
| test_expect_success 'make remote branches' ' |
| git update-ref refs/remotes/origin/branch-one branch-one |
| git update-ref refs/remotes/origin/branch-two branch-two |
| git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/branch-one |
| test_expect_success 'git branch shows local branches' ' |
| origin/HEAD -> origin/branch-one |
| test_expect_success 'git branch -r shows remote branches' ' |
| remotes/origin/HEAD -> origin/branch-one |
| remotes/origin/branch-one |
| remotes/origin/branch-two |
| test_expect_success 'git branch -a shows local and remote branches' ' |
| test_expect_success 'git branch -v shows branch summaries' ' |
| awk "{print \$NF}" <tmp >actual && |
| test_expect_success 'git branch shows detached HEAD properly' ' |