| 149 | * Detects if an error is caused by a git lock file conflict. |
| 150 | */ |
| 151 | export 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. |