summaryrefslogtreecommitdiff
path: root/builtin/count-objects.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2025-10-06 19:21:19 +0200
committerJunio C Hamano <gitster@pobox.com>2025-10-06 10:51:42 -0700
commit171c1688ccbe5e6d709444a65a5ca2e0a9175b16 (patch)
tree529b36bec399916d42fc2a8cec02e1c0d55e2746 /builtin/count-objects.c
parentc309b65a7c8a0dc8a1566ac3587d37d935632e4d (diff)
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>
Diffstat (limited to 'builtin/count-objects.c')
0 files changed, 0 insertions, 0 deletions