From e5a329a279c7ecb5214ccc049ca659aa3ad733cf Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 11 Dec 2018 14:46:07 +0900 Subject: run-command: report exec failure In 321fd823 ("run-command: mark path lookup errors with ENOENT", 2018-10-24), we rewrote the logic to execute a command by looking in the directories on $PATH; as a side effect, a request to run a command that is not found on $PATH is noticed even before a child process is forked to execute it. We however stopped to report an exec failure in such a case by mistake. Add a logic to report the error unless silent-exec-failure is requested, to match the original code. Reported-by: John Passaro Signed-off-by: Junio C Hamano --- t/t0061-run-command.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 't') diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh index b9cfc03a53..8a484878ec 100755 --- a/t/t0061-run-command.sh +++ b/t/t0061-run-command.sh @@ -14,11 +14,13 @@ EOF >empty test_expect_success 'start_command reports ENOENT (slash)' ' - test-tool run-command start-command-ENOENT ./does-not-exist + test-tool run-command start-command-ENOENT ./does-not-exist 2>err && + test_i18ngrep "\./does-not-exist" err ' test_expect_success 'start_command reports ENOENT (no slash)' ' - test-tool run-command start-command-ENOENT does-not-exist + test-tool run-command start-command-ENOENT does-not-exist 2>err && + test_i18ngrep "does-not-exist" err ' test_expect_success 'run_command can run a command' ' @@ -34,7 +36,8 @@ test_expect_success 'run_command is restricted to PATH' ' write_script should-not-run <<-\EOF && echo yikes EOF - test_must_fail test-tool run-command run-command should-not-run + test_must_fail test-tool run-command run-command should-not-run 2>err && + test_i18ngrep "should-not-run" err ' test_expect_success !MINGW 'run_command can run a script without a #! line' ' -- cgit v1.3 From 98f2d930d19c86c3c3d51176616558a73fd3d1de Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 Dec 2018 10:14:54 -0800 Subject: t4256: mark support files as LF-only The test t4256-am-format-flowed.sh requires carefully applying a patch after ignoring padding whitespace. This breaks if the file is munged to include CRLF line endings instead of LF. Signed-off-by: Johannes Schindelin Signed-off-by: Derrick Stolee Signed-off-by: Junio C Hamano --- t/.gitattributes | 1 + 1 file changed, 1 insertion(+) (limited to 't') diff --git a/t/.gitattributes b/t/.gitattributes index 3bd959ae52..af5ce637b7 100644 --- a/t/.gitattributes +++ b/t/.gitattributes @@ -14,6 +14,7 @@ t[0-9][0-9][0-9][0-9]/* -whitespace /t4135/* eol=lf /t4211/* eol=lf /t4252/* eol=lf +/t4256/1/* eol=lf /t5100/* eol=lf /t5515/* eol=lf /t556x_common eol=lf -- cgit v1.3 From 0365b9ec59f5fbe6a1a638bdb006d0ebcbd53a99 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 13 Dec 2018 06:04:19 -0800 Subject: t9902: 'send-email' test case requires PERL The oneline notwithstanding, 13374987dd (completion: use _gitcompbuiltin for format-patch, 2018-11-03) changed also the way send-email options are completed, by asking the git send-email command itself what options it offers. Necessarily, this must fail when built with NO_PERL because send-email itself is a Perl script. Which means that we need the PERL prerequisite for the send-email test case in t9902. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- t/t9902-completion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't') diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index d01ad8eb25..137fdc9bd5 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -1539,7 +1539,7 @@ test_expect_success 'complete tree filename with metacharacters' ' EOF ' -test_expect_success 'send-email' ' +test_expect_success PERL 'send-email' ' test_completion "git send-email --cov" "--cover-letter " && test_completion "git send-email ma" "master " ' -- cgit v1.3