From 837e3332f8bd96c13913f67b7dda75cc461b0466 Mon Sep 17 00:00:00 2001 From: zhengweidi Date: Mon, 5 Sep 2022 20:03:55 +0800 Subject: [PATCH] Export function Get-GitConciseStatusFromCache corresponds to https://github.com/cmarcusreid/git-status-cache/pull/29 --- GitStatusCachePoshClient.ps1 | 6 ++++++ GitStatusCachePoshClient.psm1 | 1 + 2 files changed, 7 insertions(+) diff --git a/GitStatusCachePoshClient.ps1 b/GitStatusCachePoshClient.ps1 index 771ed07..4bff682 100644 --- a/GitStatusCachePoshClient.ps1 +++ b/GitStatusCachePoshClient.ps1 @@ -216,6 +216,12 @@ function Get-GitStatusFromCache return Send-RequestToGitStatusCache($request) } +function Get-GitConciseStatusFromCache +{ + $request = new-object psobject -property @{ Version = 1; Action = "GetConciseStatus"; Path = (Get-Location).Path } | ConvertTo-Json -Compress + return Send-RequestToGitStatusCache($request) +} + function Get-GitStatusCacheStatistics { $request = new-object psobject -property @{ Version = 1; Action = "GetCacheStatistics"; } | ConvertTo-Json -Compress diff --git a/GitStatusCachePoshClient.psm1 b/GitStatusCachePoshClient.psm1 index 481b866..e10c166 100644 --- a/GitStatusCachePoshClient.psm1 +++ b/GitStatusCachePoshClient.psm1 @@ -10,6 +10,7 @@ Push-Location $psScriptRoot Pop-Location Export-ModuleMember -Function @('Get-GitStatusFromCache') +Export-ModuleMember -Function @('Get-GitConciseStatusFromCache') Export-ModuleMember -Function @('Get-GitStatusCacheStatistics') Export-ModuleMember -Function @('Remove-GitStatusCache') Export-ModuleMember -Function @('Restart-GitStatusCache')