Add end-of-line anchor and explanatory comment to Get-GitStatusSetting regex

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-08 19:00:56 +00:00
parent 7df73096d6
commit bc970e7f78

View File

@@ -190,7 +190,10 @@ function Show-GitStatus {
function Get-GitStatusSetting { function Get-GitStatusSetting {
$gitConfig = git --no-pager config -l 2>$null | Out-String $gitConfig = git --no-pager config -l 2>$null | Out-String
if ($gitConfig -match '(?m)^cmder\.(ps)?status=false') { # Check if git status display is disabled via config
# Matches: cmder.status=false or cmder.psstatus=false (PowerShell-specific)
# Anchored to match complete lines only to avoid false positives
if ($gitConfig -match '(?m)^cmder\.(ps)?status=false$') {
return $false return $false
} }