@@ -333,7 +333,7 @@ test_expect_success 'different prompts for mode change/deleted' '
333333 sed -n "s/^\(([0-9/]*) Stage .*?\).*/\1/p" actual >actual.filtered &&
334334 cat >expect <<-\EOF &&
335335 (1/1) Stage deletion [y,n,q,a,d,p,?]?
336- (1/2) Stage mode change [y,n,q,a,d,j,J,g,/,p,?]?
336+ (1/2) Stage mode change [y,n,q,a,d,k,K, j,J,g,/,p,?]?
337337 (2/2) Stage this hunk [y,n,q,a,d,K,J,g,/,e,p,?]?
338338 EOF
339339 test_cmp expect actual.filtered
@@ -527,7 +527,7 @@ test_expect_success 'goto hunk 1 with "g 1"' '
527527 _10
528528 +15
529529 _20
530- (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]?_
530+ (1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]?_
531531 EOF
532532 test_write_lines s y g 1 | git add -p >actual &&
533533 tail -n 7 <actual >actual.trimmed &&
@@ -540,7 +540,7 @@ test_expect_success 'goto hunk 1 with "g1"' '
540540 _10
541541 +15
542542 _20
543- (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]?_
543+ (1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]?_
544544 EOF
545545 test_write_lines s y g1 | git add -p >actual &&
546546 tail -n 4 <actual >actual.trimmed &&
@@ -554,7 +554,7 @@ test_expect_success 'navigate to hunk via regex /pattern' '
554554 _10
555555 +15
556556 _20
557- (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]?_
557+ (1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]?_
558558 EOF
559559 test_write_lines s y /1,2 | git add -p >actual &&
560560 tail -n 5 <actual >actual.trimmed &&
@@ -567,7 +567,7 @@ test_expect_success 'navigate to hunk via regex / pattern' '
567567 _10
568568 +15
569569 _20
570- (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]?_
570+ (1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]?_
571571 EOF
572572 test_write_lines s y / 1,2 | git add -p >actual &&
573573 tail -n 4 <actual >actual.trimmed &&
@@ -579,11 +579,11 @@ test_expect_success 'print again the hunk' '
579579 tr _ " " >expect <<-EOF &&
580580 +15
581581 20
582- (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]? @@ -1,2 +1,3 @@
582+ (1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]? @@ -1,2 +1,3 @@
583583 10
584584 +15
585585 20
586- (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]?_
586+ (1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]?_
587587 EOF
588588 test_write_lines s y g 1 p | git add -p >actual &&
589589 tail -n 7 <actual >actual.trimmed &&
@@ -595,11 +595,11 @@ test_expect_success TTY 'print again the hunk (PAGER)' '
595595 cat >expect <<-EOF &&
596596 <GREEN>+<RESET><GREEN>15<RESET>
597597 20<RESET>
598- <BOLD;BLUE>(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]? <RESET>PAGER <CYAN>@@ -1,2 +1,3 @@<RESET>
598+ <BOLD;BLUE>(1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]? <RESET>PAGER <CYAN>@@ -1,2 +1,3 @@<RESET>
599599 PAGER 10<RESET>
600600 PAGER <GREEN>+<RESET><GREEN>15<RESET>
601601 PAGER 20<RESET>
602- <BOLD;BLUE>(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]? <RESET>
602+ <BOLD;BLUE>(1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]? <RESET>
603603 EOF
604604 test_write_lines s y g 1 P |
605605 (
@@ -802,15 +802,15 @@ test_expect_success 'colors can be overridden' '
802802 <BOLD>-old<RESET>
803803 <BLUE>+<RESET><BLUE>new<RESET>
804804 <CYAN> more-context<RESET>
805- <YELLOW>(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]? <RESET><MAGENTA>@@ -3 +3,2 @@<RESET>
805+ <YELLOW>(1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]? <RESET><MAGENTA>@@ -3 +3,2 @@<RESET>
806806 <CYAN> more-context<RESET>
807807 <BLUE>+<RESET><BLUE>another-one<RESET>
808808 <YELLOW>(2/2) Stage this hunk [y,n,q,a,d,K,J,g,/,e,p,?]? <RESET><MAGENTA>@@ -1,3 +1,3 @@<RESET>
809809 <CYAN> context<RESET>
810810 <BOLD>-old<RESET>
811811 <BLUE>+new<RESET>
812812 <CYAN> more-context<RESET>
813- <YELLOW>(1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,p,?]? <RESET>
813+ <YELLOW>(1/2) Stage this hunk [y,n,q,a,d,k,K, j,J,g,/,e,p,?]? <RESET>
814814 EOF
815815 test_cmp expect actual
816816'
@@ -1354,34 +1354,34 @@ do
13541354 '
13551355done
13561356
1357- test_expect_success ' option J rolls over' '
1357+ test_expect_success ' options J, K roll over' '
13581358 test_write_lines a b c d e f g h i >file &&
13591359 git add file &&
13601360 test_write_lines X b c d e f g h X >file &&
1361- test_write_lines J J q | git add -p >out &&
1362- test_write_lines 1 2 1 >expect &&
1361+ test_write_lines J J K q | git add -p >out &&
1362+ test_write_lines 1 2 1 2 >expect &&
13631363 sed -n -e "s-/.*--" -e "s/^(//p" <out >actual &&
13641364 test_cmp expect actual
13651365'
13661366
1367- test_expect_success ' options y, n, j, e roll over to next undecided (1)' '
1367+ test_expect_success ' options y, n, j, k, e roll over to next undecided (1)' '
13681368 test_write_lines a b c d e f g h i j k l m n o p q >file &&
13691369 git add file &&
13701370 test_write_lines X b c d e f g h X j k l m n o p X >file &&
13711371 test_set_editor : &&
1372- test_write_lines g3 y g3 n g3 j g3 e q | git add -p >out &&
1373- test_write_lines 1 3 1 3 1 3 1 3 1 >expect &&
1372+ test_write_lines g3 y g3 n g3 j g3 e k q | git add -p >out &&
1373+ test_write_lines 1 3 1 3 1 3 1 3 1 2 >expect &&
13741374 sed -n -e "s-/.*--" -e "s/^(//p" <out >actual &&
13751375 test_cmp expect actual
13761376'
13771377
1378- test_expect_success ' options y, n, j, e roll over to next undecided (2)' '
1378+ test_expect_success ' options y, n, j, k, e roll over to next undecided (2)' '
13791379 test_write_lines a b c d e f g h i j k l m n o p q >file &&
13801380 git add file &&
13811381 test_write_lines X b c d e f g h X j k l m n o p X >file &&
13821382 test_set_editor : &&
1383- test_write_lines y g3 y g3 n g3 j g3 e q | git add -p >out &&
1384- test_write_lines 1 2 3 2 3 2 3 2 3 2 >expect &&
1383+ test_write_lines y g3 y g3 n g3 j g3 e g1 k q | git add -p >out &&
1384+ test_write_lines 1 2 3 2 3 2 3 2 3 2 1 2 >expect &&
13851385 sed -n -e "s-/.*--" -e "s/^(//p" <out >actual &&
13861386 test_cmp expect actual
13871387'
0 commit comments