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 <spearce@spearce.org>
This commit is contained in:
parent
700a65ce38
commit
d90d83a3a9
2
git-gui
2
git-gui
@ -266,7 +266,7 @@ proc repository_state {ctvar hdvar mhvar} {
|
|||||||
if {[catch {set current_branch [exec git symbolic-ref HEAD]}]} {
|
if {[catch {set current_branch [exec git symbolic-ref HEAD]}]} {
|
||||||
set current_branch {}
|
set current_branch {}
|
||||||
} else {
|
} else {
|
||||||
regsub ^refs/(heads|tags)/ \
|
regsub ^refs/((heads|tags|remotes)/)? \
|
||||||
$current_branch \
|
$current_branch \
|
||||||
{} \
|
{} \
|
||||||
current_branch
|
current_branch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user