diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-04-26 16:05:19 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-04-26 16:05:19 (GMT) |
commit | 61ce8277cc3e54572b55da83a36e66cee972358c (patch) | |
tree | 6011d69bf47be0b7446061542a9bf3d6abddf0d3 | |
parent | 2a3ae87e7f8e9585d7565a8b5d6a6c9c28d6d943 (diff) | |
download | git-next.zip git-next.tar.gz git-next.tar.bz2 |
Revert "Merge branch 'rj/add-p-typo-reaction' into next"next
This reverts commit 8ac0509b470be6b9ddfb0dc924af44a380236d83, reversing
changes made to bf66ab6ea7ebd61a437bdb59fb31a39ca26a9261.
-rw-r--r-- | add-patch.c | 5 | ||||
-rwxr-xr-x | t/t3701-add-interactive.sh | 16 |
2 files changed, 2 insertions, 19 deletions
diff --git a/add-patch.c b/add-patch.c index 447e816..0997d4a 100644 --- a/add-patch.c +++ b/add-patch.c @@ -1668,7 +1668,7 @@ soft_increment: } } else if (s->answer.buf[0] == 'p') { rendered_hunk_index = -1; - } else if (s->answer.buf[0] == '?') { + } else { const char *p = _(help_patch_remainder), *eol = p; color_fprintf(stdout, s->s.help_color, "%s", @@ -1692,9 +1692,6 @@ soft_increment: color_fprintf_ln(stdout, s->s.help_color, "%.*s", (int)(eol - p), p); } - } else { - err(s, _("Unknown command '%s' (use '?' for help)"), - s->answer.buf); } } diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index ed7e414..04d8333 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -8,8 +8,6 @@ TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh . "$TEST_DIRECTORY"/lib-terminal.sh -SP=" " - diff_cmp () { for x do @@ -58,19 +56,6 @@ test_expect_success 'warn about add.interactive.useBuiltin' ' done ' -test_expect_success 'unknown command' ' - test_when_finished "git reset --hard; rm -f command" && - echo W >command && - git add -N command && - git diff command >expect && - cat >>expect <<-EOF && - (1/1) Stage addition [y,n,q,a,d,e,p,?]? Unknown command ${SQ}W${SQ} (use ${SQ}?${SQ} for help) - (1/1) Stage addition [y,n,q,a,d,e,p,?]?$SP - EOF - git add -p -- command <command >actual 2>&1 && - test_cmp expect actual -' - test_expect_success 'setup (initial)' ' echo content >file && git add file && @@ -247,6 +232,7 @@ test_expect_success 'setup file' ' ' test_expect_success 'setup patch' ' + SP=" " && NULL="" && cat >patch <<-EOF @@ -1,4 +1,4 @@ |