MCPcopy
hub / github.com/21st-dev/1code / isLockFileError

Function isLockFileError

src/main/lib/git/git-factory.ts:151–159  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

149 * Detects if an error is caused by a git lock file conflict.
150 */
151export function isLockFileError(error: unknown): boolean {
152 const message = error instanceof Error ? error.message : String(error);
153 return (
154 message.includes("index.lock") ||
155 message.includes("Unable to create") ||
156 message.includes("Another git process seems to be running") ||
157 message.includes(".lock': File exists")
158 );
159}
160
161/**
162 * Executes a git operation with automatic retry on lock file conflicts.

Callers 1

withLockRetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected