From: Shawn O. Pearce Date: Sat, 25 Nov 2006 07:45:19 +0000 (-0500) Subject: git-gui: Parse off refs/remotes when showing current branch. X-Git-Tag: gitgui-0.6.0~155 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d90d83a3a95e5fb4672906589ac0a19c19f1187b;p=git.git git-gui: Parse off refs/remotes when showing current branch. Even though the user shouldn't have a remote branch checked out, if they do we should still show as short of the branch name as possible. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui b/git-gui index 69ebd9095..48e781dd3 100755 --- a/git-gui +++ b/git-gui @@ -266,7 +266,7 @@ proc repository_state {ctvar hdvar mhvar} { if {[catch {set current_branch [exec git symbolic-ref HEAD]}]} { set current_branch {} } else { - regsub ^refs/(heads|tags)/ \ + regsub ^refs/((heads|tags|remotes)/)? \ $current_branch \ {} \ current_branch