File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -556,21 +556,21 @@ __git_ps1 ()
556
556
fi
557
557
fi
558
558
559
- b=${b## refs/ heads/ }
560
559
local z=" ${GIT_PS1_STATESEPARATOR-" " } "
561
560
561
+ b=${b## refs/ heads/ }
562
+ if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
563
+ __git_ps1_branch_name=$b
564
+ b=" \$ {__git_ps1_branch_name}"
565
+ fi
566
+
562
567
# NO color option unless in PROMPT_COMMAND mode or it's Zsh
563
568
if [ -n " ${GIT_PS1_SHOWCOLORHINTS-} " ]; then
564
569
if [ $pcmode = yes ] || [ -n " ${ZSH_VERSION-} " ]; then
565
570
__git_ps1_colorize_gitstring
566
571
fi
567
572
fi
568
573
569
- if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
570
- __git_ps1_branch_name=$b
571
- b=" \$ {__git_ps1_branch_name}"
572
- fi
573
-
574
574
local f=" $h$w$i$s$u$p "
575
575
local gitstring=" $c$b ${f: +$z$f }${sparse} $r ${upstream} "
576
576
You can’t perform that action at this time.
0 commit comments