Commit 171c168
add-patch: let options y, n, j, and e roll over to next undecided
The options y, n, and e mark the current hunk as decided. If there's
another undecided hunk towards the bottom of the hunk array they go
there. If there isn't, but there is another undecided hunk towards the
top then they go to the very first hunk, no matter if it has already
been decided on.
The option j does basically the same move. Technically it is not
allowed if there's no undecided hunk towards the bottom, but the
variable "permitted" is never reset, so this permission is retained
from the very first hunk. That may a bug, but this behavior is at
least consistent with y, n, and e and arguably more useful than
refusing to move.
Improve the roll-over behavior of these four options by moving to the
first undecided hunk instead of hunk 1, consistent with what they do
when not rolling over.
Also adjust the error message for j, as it will only be shown if
there's no other undecided hunk in either direction.
Reported-by: Windl, Ulrich <u.windl@ukr.de>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent c309b65 commit 171c168
File tree
3 files changed
+33
-4
lines changed- Documentation
- t
3 files changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1397 | 1397 | | |
1398 | 1398 | | |
1399 | 1399 | | |
1400 | | - | |
| 1400 | + | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | 1403 | | |
| |||
1408 | 1408 | | |
1409 | 1409 | | |
1410 | 1410 | | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
1411 | 1416 | | |
1412 | 1417 | | |
1413 | 1418 | | |
| |||
1451 | 1456 | | |
1452 | 1457 | | |
1453 | 1458 | | |
1454 | | - | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
1455 | 1462 | | |
1456 | 1463 | | |
1457 | 1464 | | |
| |||
1594 | 1601 | | |
1595 | 1602 | | |
1596 | 1603 | | |
1597 | | - | |
| 1604 | + | |
1598 | 1605 | | |
1599 | 1606 | | |
1600 | 1607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
1367 | 1389 | | |
0 commit comments