Skip to content

Commit

Permalink
Be sure to honor EnableStashStatus when using cache
Browse files Browse the repository at this point in the history
Fix #761
  • Loading branch information
rkeithhill committed Apr 12, 2020
1 parent a160c9a commit 0c38eae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/GitUtils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,13 @@ function Get-GitStatus {
$aheadBy = $cacheResponse.AheadBy
$behindBy = $cacheResponse.BehindBy

if ($cacheResponse.Stashes) { $stashCount = $cacheResponse.Stashes.Length }
if ($cacheResponse.State) { $branch += "|" + $cacheResponse.State }
if ($settings.EnableStashStatus -and $cacheResponse.Stashes) {
$stashCount = $cacheResponse.Stashes.Length
}

if ($cacheResponse.State) {
$branch += "|" + $cacheResponse.State
}
}
}
else {
Expand Down

0 comments on commit 0c38eae

Please sign in to comment.