Skip to content

Commit

Permalink
fix CHERRY-PICKING display bug
Browse files Browse the repository at this point in the history
close #818
  • Loading branch information
NihilityT committed Jan 22, 2021
1 parent 4a8cda0 commit f5dc3a2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -352,24 +352,16 @@ function Get-GitStatus {
continue
}

'^## (?<branch>\S+?)(?:\.\.\.(?<upstream>\S+))?(?: \[(?:ahead (?<ahead>\d+))?(?:, )?(?:behind (?<behind>\d+))?(?<gone>gone)?\])?$' {
'^## \S+?(?:\.\.\.(?<upstream>\S+))?(?: \[(?:ahead (?<ahead>\d+))?(?:, )?(?:behind (?<behind>\d+))?(?<gone>gone)?\])?$' {
if ($sw) { dbg "Status: $_" $sw }

$branch = $matches['branch']
$upstream = $matches['upstream']
$aheadBy = [int]$matches['ahead']
$behindBy = [int]$matches['behind']
$gone = [string]$matches['gone'] -eq 'gone'
continue
}

'^## Initial commit on (?<branch>\S+)$' {
if ($sw) { dbg "Status: $_" $sw }

$branch = $matches['branch']
continue
}

default { if ($sw) { dbg "Status: $_" $sw } }
}
}
Expand Down

0 comments on commit f5dc3a2

Please sign in to comment.