Skip to content

Commit

Permalink
Add cache responses to existing lists
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Jan 2, 2017
1 parent 675299a commit 3e13ee8
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,17 @@ function Get-GitStatus($gitDir = (Get-GitDirectory)) {
$cacheResponse = Get-GitStatusFromCache
dbg 'Parsing status' $sw

$indexAdded = $cacheResponse.IndexAdded
$indexModified = $cacheResponse.IndexModified
$cacheResponse.IndexRenamed | foreach { $indexModified += $_.Old }
$indexDeleted = $cacheResponse.IndexDeleted
$indexUnmerged = $cacheResponse.Conflicted

$filesAdded = $cacheResponse.WorkingAdded
$filesModified = $cacheResponse.WorkingModified
$cacheResponse.WorkingRenamed | foreach { $filesModified += $_.Old }
$filesDeleted = $cacheResponse.WorkingDeleted
$filesUnmerged = $cacheResponse.Conflicted
$indexAdded.AddRange([string[]]$cacheResponse.IndexAdded)
$indexModified.AddRange([string[]]$cacheResponse.IndexModified)
$indexModified.AddRange([string[]]@($cacheResponse.IndexRenamed | Select-Object -ExpandProperty Old))
$indexDeleted.AddRange([string[]]$cacheResponse.IndexDeleted)
$indexUnmerged.AddRange([string[]]$cacheResponse.Conflicted)

$filesAdded.AddRange([string[]]$cacheResponse.WorkingAdded)
$filesModified.AddRange([string[]]$cacheResponse.WorkingModified)
$filesModified.AddRange([string[]]@($cacheResponse.WorkingRenamed | Select-Object -ExpandProperty Old))
$filesDeleted.AddRange([string[]]$cacheResponse.WorkingDeleted)
$filesUnmerged.AddRange([string[]]$cacheResponse.Conflicted)

$branch = $cacheResponse.Branch
$upstream = $cacheResponse.Upstream
Expand Down

0 comments on commit 3e13ee8

Please sign in to comment.