File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -345,6 +345,14 @@ function Get-GitBranchStatusColor {
345
345
# We are ahead of remote
346
346
$branchStatusTextSpan = [PoshGitTextSpan ]::new($s.BranchAheadStatusSymbol )
347
347
}
348
+ elseif ($Status.UpstreamGone -eq $true ) {
349
+ # Upstream branch is gone
350
+ $branchStatusTextSpan = [PoshGitTextSpan ]::new($s.BranchGoneStatusSymbol )
351
+ }
352
+ elseif (! $Status.Upstream ) {
353
+ # Untracked branch
354
+ $branchStatusTextSpan = [PoshGitTextSpan ]::new($s.BranchUntrackedStatusSymbol )
355
+ }
348
356
349
357
$branchStatusTextSpan.Text = ' '
350
358
$branchStatusTextSpan
@@ -457,7 +465,8 @@ function Write-GitBranchStatus {
457
465
$branchStatusTextSpan = Get-GitBranchStatusColor $Status
458
466
459
467
if (! $Status.Upstream ) {
460
- $branchStatusTextSpan.Text = $s.BranchUntrackedText
468
+ # Untracked branch
469
+ $branchStatusTextSpan.Text = $s.BranchUntrackedStatusSymbol.Text
461
470
}
462
471
elseif ($Status.UpstreamGone -eq $true ) {
463
472
# Upstream branch is gone
Original file line number Diff line number Diff line change @@ -250,6 +250,7 @@ class PoshGitPromptSettings {
250
250
[PoshGitTextSpan ]$LocalWorkingStatusSymbol = [PoshGitTextSpan ]::new(' !' , [ConsoleColor ]::DarkRed)
251
251
[PoshGitTextSpan ]$LocalStagedStatusSymbol = [PoshGitTextSpan ]::new(' ~' , [ConsoleColor ]::Cyan)
252
252
253
+ [PoshGitTextSpan ]$BranchUntrackedStatusSymbol = [PoshGitTextSpan ]::new(' ' , [ConsoleColor ]::DarkCyan) #
253
254
[PoshGitTextSpan ]$BranchGoneStatusSymbol = [PoshGitTextSpan ]::new([char ]0x00D7 , [ConsoleColor ]::DarkCyan) # × Multiplication sign
254
255
[PoshGitTextSpan ]$BranchIdenticalStatusSymbol = [PoshGitTextSpan ]::new([char ]0x2261 , [ConsoleColor ]::Cyan) # ≡ Three horizontal lines
255
256
[PoshGitTextSpan ]$BranchAheadStatusSymbol = [PoshGitTextSpan ]::new([char ]0x2191 , [ConsoleColor ]::Green) # ↑ Up arrow
@@ -262,7 +263,6 @@ class PoshGitPromptSettings {
262
263
[string ]$FileModifiedText = ' ~'
263
264
[string ]$FileRemovedText = ' -'
264
265
[string ]$FileConflictedText = ' !'
265
- [string ]$BranchUntrackedText = ' '
266
266
267
267
[bool ]$EnableStashStatus = $false
268
268
[bool ]$ShowStatusWhenZero = $true
You can’t perform that action at this time.
0 commit comments