From 479e139141c102ea92bc416e35c9b5c187e6504a Mon Sep 17 00:00:00 2001 From: Matthew Breedlove Date: Wed, 20 Aug 2025 03:09:20 -0400 Subject: [PATCH] Windows fixes for git widgets --- src/widgets/GitBranch.ts | 2 +- src/widgets/GitChanges.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/GitBranch.ts b/src/widgets/GitBranch.ts index aceeaa0..c61984d 100644 --- a/src/widgets/GitBranch.ts +++ b/src/widgets/GitBranch.ts @@ -30,7 +30,7 @@ export class GitBranchWidget implements Widget { private getGitBranch(): string | null { try { - const branch = execSync('git branch --show-current 2>/dev/null', { + const branch = execSync('git branch --show-current', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }).trim(); diff --git a/src/widgets/GitChanges.ts b/src/widgets/GitChanges.ts index 1234fb5..c2d8609 100644 --- a/src/widgets/GitChanges.ts +++ b/src/widgets/GitChanges.ts @@ -33,12 +33,12 @@ export class GitChangesWidget implements Widget { let totalInsertions = 0; let totalDeletions = 0; - const unstagedStat = execSync('git diff --shortstat 2>/dev/null', { + const unstagedStat = execSync('git diff --shortstat', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }).trim(); - const stagedStat = execSync('git diff --cached --shortstat 2>/dev/null', { + const stagedStat = execSync('git diff --cached --shortstat', { encoding: 'utf8', stdio: ['pipe', 'pipe', 'ignore'] }).trim();