diff --git a/src/GitUtils.ps1 b/src/GitUtils.ps1 index 2396bcb1b..62236da54 100644 --- a/src/GitUtils.ps1 +++ b/src/GitUtils.ps1 @@ -352,10 +352,9 @@ function Get-GitStatus { continue } - '^## (?\S+?)(?:\.\.\.(?\S+))?(?: \[(?:ahead (?\d+))?(?:, )?(?:behind (?\d+))?(?gone)?\])?$' { + '^## \S+?(?:\.\.\.(?\S+))?(?: \[(?:ahead (?\d+))?(?:, )?(?:behind (?\d+))?(?gone)?\])?$' { if ($sw) { dbg "Status: $_" $sw } - $branch = $matches['branch'] $upstream = $matches['upstream'] $aheadBy = [int]$matches['ahead'] $behindBy = [int]$matches['behind'] @@ -363,13 +362,6 @@ function Get-GitStatus { continue } - '^## Initial commit on (?\S+)$' { - if ($sw) { dbg "Status: $_" $sw } - - $branch = $matches['branch'] - continue - } - default { if ($sw) { dbg "Status: $_" $sw } } } }