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:

committed by
Junio C Hamano

parent
d8d33736b5
commit
7b787599e4
@ -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
|
||||
|
Reference in New Issue
Block a user