diff options
| author | René Scharfe <l.s.r@web.de> | 2025-10-25 07:48:28 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-26 16:34:39 -0700 |
| commit | e56f6dcd7b4c90192018e848d0810f091d092913 (patch) | |
| tree | 3908073a7287088228a9c5b351cf1cb8af31d876 /t/t3701-add-interactive.sh | |
| parent | add-patch: quit without skipping undecided hunks (diff) | |
| download | git-e56f6dcd7b4c90192018e848d0810f091d092913.tar.gz git-e56f6dcd7b4c90192018e848d0810f091d092913.zip | |
add-patch: quit on EOF
If we reach the end of the input, e.g. because the user pressed ctrl-D
on Linux, there is no point in showing any more prompts, as we won't get
any reply. Do the same as option 'q' would: Quit.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
| -rwxr-xr-x | t/t3701-add-interactive.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index 851ca6dd91..4285314f35 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -1431,4 +1431,15 @@ test_expect_success 'invalid option s is rejected' ' test_cmp expect actual ' +test_expect_success 'EOF quits' ' + echo a >file && + echo a >file2 && + git add file file2 && + echo X >file && + echo X >file2 && + git add -p </dev/null >out && + test_grep file out && + test_grep ! file2 out +' + test_done |
