summaryrefslogtreecommitdiff
path: root/tree-walk.c
diff options
context:
space:
mode:
authorLibravatar Jay Soffian <jaysoffian@gmail.com>2009-02-13 04:40:18 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-02-13 17:02:11 -0800
commit209d336ae3923f2c1783a42b12fca50f3bee0802 (patch)
tree688d68a871c3c63da02a1c926257067208b88a9c /tree-walk.c
parentMerge branch 'maint' (diff)
downloadtgif-209d336ae3923f2c1783a42b12fca50f3bee0802.tar.xz
builtin-branch: improve output when displaying remote branches
When encountering a symref (typically refs/remotes/<remote>/HEAD), display the ref target. When displaying local and remote branches, prefix the remote branch names with "remotes/" to make the remote branches clear from the local branches. If displaying only the remote branches, the prefix is not shown since it would be redundant. Sample output: $ git branch foo -> master * master rather-long-branch-name $ git branch -v foo -> master * master 51cecb2 initial rather-long-branch-name 51cecb2 initial $ git branch -v --no-abbrev foo -> master * master 51cecb2dbb1a1902bb4df79b543c8f951ee59d83 initial rather-long-branch-name 51cecb2dbb1a1902bb4df79b543c8f951ee59d83 initial $ git branch -r frotz/HEAD -> frotz/master frotz/master origin/HEAD -> origin/master origin/UNUSUAL -> refs/heads/master origin/master $ git branch -a foo -> master * master rather-long-branch-name remotes/frotz/HEAD -> frotz/master remotes/frotz/master remotes/origin/HEAD -> origin/master remotes/origin/UNUSUAL -> refs/heads/master remotes/origin/master $ git branch -rv frotz/HEAD -> frotz/master frotz/master e1d8130 added file2 origin/HEAD -> origin/master origin/UNUSUAL -> refs/heads/master origin/master e1d8130 added file2 $ git branch -av foo -> master * master 51cecb2 initial rather-long-branch-name 51cecb2 initial remotes/frotz/HEAD -> frotz/master remotes/frotz/master e1d8130 added file2 remotes/origin/HEAD -> origin/master remotes/origin/UNUSUAL -> refs/heads/master remotes/origin/master e1d8130 added file2 Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.c')
0 files changed, 0 insertions, 0 deletions