Commit 732650e
add-patch: update hunk splitability after editing
If, when the user edits a hunk, they change deletion lines into
context lines or vice versa, then the number of hunks that the edited
hunk can be split into may differ from the unedited hunk. This means
that so we should recalculate `hunk->splittable_into` after the hunk
has been edited. In practice users are unlikely to hit this bug as it
is doubtful that a user who has edited a hunk will split it afterwards.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 3b9532d commit 732650e
2 files changed
+32
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| 1188 | + | |
1188 | 1189 | | |
| 1190 | + | |
1189 | 1191 | | |
1190 | 1192 | | |
1191 | | - | |
| 1193 | + | |
| 1194 | + | |
1192 | 1195 | | |
1193 | 1196 | | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1194 | 1200 | | |
1195 | 1201 | | |
1196 | 1202 | | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
1197 | 1206 | | |
1198 | 1207 | | |
1199 | 1208 | | |
1200 | 1209 | | |
| 1210 | + | |
1201 | 1211 | | |
1202 | 1212 | | |
1203 | 1213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1311 | 1311 | | |
1312 | 1312 | | |
1313 | 1313 | | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
1314 | 1335 | | |
0 commit comments