Skip to content

Commit 2c3cc43

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5099f64 commit 2c3cc43

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Documentation/git-add.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,10 +342,10 @@ patch::
342342
d - do not stage this hunk or any of the later hunks in the file
343343
g - select a hunk to go to
344344
/ - 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
349349
s - split the current hunk into smaller hunks
350350
e - manually edit the current hunk
351351
p - print the current hunk

add-patch.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,10 +1397,10 @@ static size_t display_hunks(struct add_p_state *s,
13971397
}
13981398

13991399
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"
14041404
"g - select a hunk to go to\n"
14051405
"/ - search for a hunk matching the given regex\n"
14061406
"s - split the current hunk into smaller hunks\n"

0 commit comments

Comments
 (0)