diff options
author | Johannes Sixt <j6t@kdbg.org> | 2014-10-26 09:09:20 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-10-27 19:17:56 +0100 |
commit | 25098690a0151ba29ec1c728d783366c1899624d (patch) | |
tree | faea285763dccc0e2aea44ecfc8ab9f1df3f8ad3 /t | |
parent | Merge branch 'maint-2.0' into maint (diff) | |
download | git-25098690a0151ba29ec1c728d783366c1899624d.tar.xz git-25098690a0151ba29ec1c728d783366c1899624d.zip |
difftool--helper: exit when reading a prompt answer fails
An attempt to quit difftool by hitting Ctrl-D (EOF) at its prompt does
not quit it, but is treated as if 'yes' was answered to the prompt and
all following prompts, which is contrary to the user's intent. Fix the
error check.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t7800-difftool.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index dc30a514bf..9cf5dc9347 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -301,6 +301,14 @@ test_expect_success PERL 'say no to the second file' ' ! grep br2 output ' +test_expect_success PERL 'ending prompt input with EOF' ' + git difftool -x cat branch </dev/null >output && + ! grep master output && + ! grep branch output && + ! grep m2 output && + ! grep br2 output +' + test_expect_success PERL 'difftool --tool-help' ' git difftool --tool-help >output && grep tool output |