Commit 46eaa04
authored
Better handle modify/delete conflicts. (#19)
## Description
When a cherry-pick encounters a modify/delete conflict (one side
modifies a file the other deleted), git does not produce conflict
markers. The existing `git add -A` step silently resolves these by
keeping the file, and the conflict-resolution agent has no signal that a
conflict occurred — so it does nothing.
This change detects modify/delete conflicts from `git status
--porcelain` before staging, writes a `.repo-sync-conflicts.json`
manifest to the working tree (not committed), and updates the
conflict-resolution skill to consume it. The agent now knows about these
conflicts and defaults to honoring the deletion.
## Testing
Manual — will be exercised by the next cherry-pick conflict that
involves a deleted file.1 parent c2eaf8f commit 46eaa04
3 files changed
Lines changed: 110 additions & 17 deletions
File tree
- .agents/skills/conflict-resolution
- src/repo_sync
- stack
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
41 | 74 | | |
42 | 75 | | |
43 | 76 | | |
| |||
53 | 86 | | |
54 | 87 | | |
55 | 88 | | |
56 | | - | |
| 89 | + | |
57 | 90 | | |
58 | 91 | | |
59 | 92 | | |
| |||
62 | 95 | | |
63 | 96 | | |
64 | 97 | | |
65 | | - | |
| 98 | + | |
66 | 99 | | |
67 | 100 | | |
68 | 101 | | |
| |||
71 | 104 | | |
72 | 105 | | |
73 | 106 | | |
74 | | - | |
| 107 | + | |
75 | 108 | | |
76 | | - | |
| 109 | + | |
77 | 110 | | |
78 | 111 | | |
79 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
167 | 192 | | |
168 | 193 | | |
169 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
415 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
416 | 428 | | |
417 | 429 | | |
418 | 430 | | |
419 | 431 | | |
420 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
421 | 451 | | |
422 | | - | |
| 452 | + | |
| 453 | + | |
423 | 454 | | |
424 | 455 | | |
425 | 456 | | |
426 | 457 | | |
427 | 458 | | |
428 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
429 | 464 | | |
430 | 465 | | |
431 | 466 | | |
| |||
434 | 469 | | |
435 | 470 | | |
436 | 471 | | |
437 | | - | |
| 472 | + | |
438 | 473 | | |
439 | 474 | | |
440 | 475 | | |
| |||
452 | 487 | | |
453 | 488 | | |
454 | 489 | | |
455 | | - | |
| 490 | + | |
456 | 491 | | |
457 | 492 | | |
458 | 493 | | |
| |||
465 | 500 | | |
466 | 501 | | |
467 | 502 | | |
468 | | - | |
| 503 | + | |
469 | 504 | | |
470 | 505 | | |
471 | 506 | | |
| |||
478 | 513 | | |
479 | 514 | | |
480 | 515 | | |
481 | | - | |
| 516 | + | |
482 | 517 | | |
483 | 518 | | |
484 | 519 | | |
| |||
493 | 528 | | |
494 | 529 | | |
495 | 530 | | |
496 | | - | |
| 531 | + | |
497 | 532 | | |
498 | 533 | | |
499 | 534 | | |
| |||
0 commit comments