libgit2's merge implementation creates MERGE_HEAD even for squash merges, unlike CLI git. When the merge fails with conflicts, the error paths in mergeMilestoneToMain cleaned SQUASH_MSG and MERGE_MSG but left MERGE_HEAD on disk. This blocked all subsequent merge attempts and caused doctor to report corrupt merge state. Add MERGE_HEAD cleanup (via nativeMergeAbort + explicit unlink) to: - The code-conflict error path (before MergeConflictError throw) - The dirty-working-tree error path (defensive) - The success path (alongside existing SQUASH_MSG cleanup) Closes #2912 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agents | ||
| extensions | ||
| skills | ||
| GSD-WORKFLOW.md | ||