fix: use double quotes for git branch format string on Linux

The git branch --format option needs proper quoting to work
cross-platform. Single quotes are preserved literally on Windows,
while unquoted format strings may be misinterpreted on Linux.
Using double quotes works correctly on both platforms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-17 23:03:29 +01:00
parent 76cb72812f
commit 3eac848d4f

View File

@@ -38,9 +38,10 @@ export function createListBranchesHandler() {
const currentBranch = currentBranchOutput.trim();
// List all local branches
// Use %(refname:short) without quotes - quotes are preserved on Windows
// Use double quotes around the format string for cross-platform compatibility
// Single quotes are preserved literally on Windows; double quotes work on both
const { stdout: branchesOutput } = await execAsync(
"git branch --format=%(refname:short)",
'git branch --format="%(refname:short)"',
{ cwd: worktreePath }
);