Skip to content

Commit

Permalink
Remove member enumeration to support earlier versions of PowerShell.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmarcusreid committed Jan 15, 2017
1 parent 2b202c0 commit 05015b9
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,16 @@ function Get-GitStatus($gitDir = (Get-GitDirectory)) {

$indexAdded.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.IndexAdded))))
$indexModified.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.IndexModified))))
$indexRenamedOld = $cacheResponse.IndexRenamed.Old
if ($indexRenamedOld) {
$indexModified.AddRange($castStringSeq.Invoke($null, (,@($indexRenamedOld))))
foreach ($indexRenamed in $cacheResponse.IndexRenamed) {
$indexModified.Add($indexRenamed.Old)
}
$indexDeleted.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.IndexDeleted))))
$indexUnmerged.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.Conflicted))))

$filesAdded.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.WorkingAdded))))
$filesModified.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.WorkingModified))))
$workingRenamedOld = $cacheResponse.WorkingRenamed.Old
if ($workingRenamedOld) {
$filesModified.AddRange($castStringSeq.Invoke($null, (,@($workingRenamedOld))))
foreach ($workingRenamed in $cacheResponse.WorkingRenamed) {
$filesModified.Add($workingRenamed.Old)
}
$filesDeleted.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.WorkingDeleted))))
$filesUnmerged.AddRange($castStringSeq.Invoke($null, (,@($cacheResponse.Conflicted))))
Expand Down

0 comments on commit 05015b9

Please sign in to comment.