Commit ad90677
committed
fix: add backup before git reset --hard in rebase_continue and rebase_skip
rebase_continue() and rebase_skip() performed git reset --hard during
squash-merge Reset handling without creating a backup branch first,
unlike rebase() which always creates a backup. This was a data loss risk.
Add create_backup_branch() helper and call it before destructive resets
in both functions. Also add 10 new integration tests covering squash-merge
handling in continue/skip, second conflicts, abort with multiple modified
branches, step mode with conflict, dirty working directory, cleanup
backups after continue, and status with mixed statuses.1 parent 9971291 commit ad90677
2 files changed
Lines changed: 1556 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
604 | 609 | | |
605 | 610 | | |
606 | 611 | | |
| |||
910 | 915 | | |
911 | 916 | | |
912 | 917 | | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
913 | 923 | | |
914 | 924 | | |
915 | 925 | | |
| |||
1122 | 1132 | | |
1123 | 1133 | | |
1124 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
1125 | 1144 | | |
1126 | 1145 | | |
1127 | 1146 | | |
| |||
0 commit comments