branch: reorganize verbose options
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 28 Aug 2013 23:52:51 +0000 (18:52 -0500)
committerFelipe Contreras <felipe.contreras@gmail.com>
Wed, 18 May 2016 20:05:37 +0000 (15:05 -0500)
commitf3415ac0fc82d2d3d9674eef9cf46f5ca7809123
treeacf6a93e1119f51ba0df4db3cb78a5a91ad1e6d4
parent754884255bb580df159e58defa81cdd30b5c430c
branch: reorganize verbose options

`git branch -v` before:

  fc/branch/nice-verbose 4761939 [ahead 1] branch: reorganize verbose options

`git branch -v` after:

  fc/branch/nice-verbose 4761939 [master] branch: reorganize verbose options

Showing the upstream tracking branch is more important than how many commits
are ahead/behind, after all you need to know ahead/behind compared to _what_.
So now `git branch -v` shows the upstream, but not the tracking info, and
`git branch -vv` shows all information (unchanged).

An additional benefit is that `git branch -v` is now much faster:

Before:

 git branch -v  1.28s user 0.02s system 99% cpu 1.299 total

After:

 git branch -v  0.01s user 0.01s system 87% cpu 0.019 total

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
builtin/branch.c
t/t3201-branch-contains.sh
t/t6040-tracking-info.sh