add-patch: improve help for options j, J, k, and K

The options j, J, k, and K don't affect the status of the current hunk. They just go to a different one. This is true whether the current hunk is undecided or not. Avoid misunderstanding by no longer mentioning the current hunk explicitly in their help texts. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

René Scharfe committed Oct 6, 2025 at 19:19 UTC 2c3cc43f96f9568d5475e46bd1442c5551129ce8
2 files changed +8 -8
Documentation/git-add.adoc
+4 -4
@@ -342,10 +342,10 @@ patch::
342 d - do not stage this hunk or any of the later hunks in the file
343 g - select a hunk to go to
344 / - search for a hunk matching the given regex
345 - j - leave this hunk undecided, see next undecided hunk
346 - J - leave this hunk undecided, see next hunk
347 - k - leave this hunk undecided, see previous undecided hunk
348 - K - leave this hunk undecided, see previous hunk
345 + j - go to the next undecided hunk
346 + J - go to the next hunk
347 + k - go to the previous undecided hunk
348 + K - go to the previous hunk
349 s - split the current hunk into smaller hunks
350 e - manually edit the current hunk
351 p - print the current hunk
add-patch.c
+4 -4
@@ -1397,10 +1397,10 @@ static size_t display_hunks(struct add_p_state *s,
1397 }
1398
1399 static const char help_patch_remainder[] =
1400 -N_("j - leave this hunk undecided, see next undecided hunk\n"
1401 - "J - leave this hunk undecided, see next hunk\n"
1402 - "k - leave this hunk undecided, see previous undecided hunk\n"
1403 - "K - leave this hunk undecided, see previous hunk\n"
1400 +N_("j - go to the next undecided hunk\n"
1401 + "J - go to the next hunk\n"
1402 + "k - go to the previous undecided hunk\n"
1403 + "K - go to the previous hunk\n"
1404 "g - select a hunk to go to\n"
1405 "/ - search for a hunk matching the given regex\n"
1406 "s - split the current hunk into smaller hunks\n"