summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-11-03 06:49:54 -0800
committerJunio C Hamano <gitster@pobox.com>2025-11-03 06:49:54 -0800
commit18a7988898889bf9c8e17ad5a305d7e529d1ec6b (patch)
tree1a764fb833f1a33b21cf04d0408df7fcf0c833c9 /t
parenta99f379adf116d53eb11957af5bab5214915f91d (diff)
parente56f6dcd7b4c90192018e848d0810f091d092913 (diff)
Merge branch 'rs/add-patch-quit'
The 'q'(uit) command in "git add -p" has been improved to quit without doing any meaningless work before leaving, and giving EOF (typically control-D) to the prompt is made to behave the same way. * rs/add-patch-quit: add-patch: quit on EOF add-patch: quit without skipping undecided hunks
Diffstat (limited to 't')
-rwxr-xr-xt/t3701-add-interactive.sh11
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