mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 07:22:44 +00:00
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.
This commit is contained in:
@@ -43,7 +43,7 @@ export async function getGitStatus(cwd?: string): Promise<GitStatus | null> {
|
||||
try {
|
||||
const { stdout: statusOut } = await execFileAsync(
|
||||
'git',
|
||||
['status', '--porcelain'],
|
||||
['status', '--porcelain', '--no-optional-locks'],
|
||||
{ cwd, timeout: 1000, encoding: 'utf8' }
|
||||
);
|
||||
isDirty = statusOut.trim().length > 0;
|
||||
|
||||
Reference in New Issue
Block a user