branch: -v does not automatically imply --list

"branch -v" without other options or parameters still works in the list
mode, but that is not because there is "-v" but because there is no
parameter nor option.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Michael J Gruber
2011-09-08 14:09:50 -07:00
committed by Junio C Hamano
parent d8d33736b5
commit 7b787599e4
3 changed files with 10 additions and 7 deletions

View File

@ -84,12 +84,16 @@ cat >expect <<'EOF'
two
one
EOF
test_expect_success 'git branch -v pattern shows branch summaries' '
git branch -v branch* >tmp &&
test_expect_success 'git branch --list -v pattern shows branch summaries' '
git branch --list -v branch* >tmp &&
awk "{print \$NF}" <tmp >actual &&
test_cmp expect actual
'
test_expect_success 'git branch -v pattern does not show branch summaries' '
test_must_fail git branch -v branch*
'
cat >expect <<'EOF'
* (no branch)
branch-one