From 0c38eaefc2ff19a5ef331df474cc5c915960bfd7 Mon Sep 17 00:00:00 2001 From: Keith Hill Date: Sat, 11 Apr 2020 19:49:44 -0600 Subject: [PATCH] Be sure to honor EnableStashStatus when using cache Fix #761 --- src/GitUtils.ps1 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/GitUtils.ps1 b/src/GitUtils.ps1 index 23300a257..b2bd3dc3c 100644 --- a/src/GitUtils.ps1 +++ b/src/GitUtils.ps1 @@ -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 {