Skip to content

Commit

Permalink
Merge pull request #220 from TheSned/RemoveStashCalcIfSettingDisabled
Browse files Browse the repository at this point in the history
Disabled stash count calculation when EnableStashStatus is $false.
  • Loading branch information
dahlbyk committed Sep 18, 2015
2 parents ea6533d + 58669cc commit fadc4dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion GitUtils.ps1
Expand Up @@ -120,7 +120,10 @@ function Get-GitStatus($gitDir = (Get-GitDirectory)) {
if($settings.EnableFileStatus -and !$(InDisabledRepository)) {
dbg 'Getting status' $sw
$status = git -c color.status=false status --short --branch 2>$null
$stashCount = $null | git stash list 2>$null | measure-object | select -expand Count
if($settings.EnableStashStatus) {
dbg 'Getting stash count' $sw
$stashCount = $null | git stash list 2>$null | measure-object | select -expand Count
}
} else {
$status = @()
}
Expand Down

0 comments on commit fadc4dd

Please sign in to comment.