From 4d7d41ff75c9b87e2a07ebcc37c2eaa0ade2d76e Mon Sep 17 00:00:00 2001 From: Abildtoft Date: Mon, 12 Jan 2026 00:39:03 +0100 Subject: [PATCH] Add --no-optional-locks to prevent stale index.lock files (#63) Prevents orphaned .git/index.lock files observed when running git status from Claude Code's statusLine. --- src/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/git.ts b/src/git.ts index 8f2b9fc..a637130 100644 --- a/src/git.ts +++ b/src/git.ts @@ -43,7 +43,7 @@ export async function getGitStatus(cwd?: string): Promise { try { const { stdout: statusOut } = await execFileAsync( 'git', - ['status', '--porcelain'], + ['status', '--porcelain', '--no-optional-locks'], { cwd, timeout: 1000, encoding: 'utf8' } ); isDirty = statusOut.trim().length > 0;