From f5dc3a2942a91cc2ad64b4449375c3e0a6a97949 Mon Sep 17 00:00:00 2001 From: Nihility Date: Sat, 23 Jan 2021 04:56:43 +0800 Subject: [PATCH] fix CHERRY-PICKING display bug close #818 --- src/GitUtils.ps1 | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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 } } } }