summaryrefslogtreecommitdiff
path: root/t/t9001-send-email.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-27 12:36:57 +0900
committerJunio C Hamano <gitster@pobox.com>2021-05-27 12:36:57 +0900
commitf4d715b0acaf008d0f09c42378cac90acaadea8e (patch)
treee87a3bdac9d479f29c36c5713697631dd530167d /t/t9001-send-email.sh
parent1accb34ce0055b9ab43cdf1a8ef6e22e7ae34ffc (diff)
parent7cbc0455cc07702c5eeff1062c7e2a820758714f (diff)
downloadgit-f4d715b0acaf008d0f09c42378cac90acaadea8e.tar.gz
Merge branch 'ab/send-email-inline-hooks-path'
Code simplification. * ab/send-email-inline-hooks-path: send-email: move "hooks_path" invocation to git-send-email.perl send-email: don't needlessly abs_path() the core.hooksPath
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-xt/t9001-send-email.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index aa603cf4d0..3b7540050c 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -539,14 +539,15 @@ test_expect_success $PREREQ "--validate respects relative core.hooksPath path" '
test_path_is_file my-hooks.ran &&
cat >expect <<-EOF &&
fatal: longline.patch: rejected by sendemail-validate hook
- fatal: command '"'"'$PWD/my-hooks/sendemail-validate'"'"' died with exit code 1
+ fatal: command '"'"'my-hooks/sendemail-validate'"'"' died with exit code 1
warning: no patches were sent
EOF
test_cmp expect actual
'
test_expect_success $PREREQ "--validate respects absolute core.hooksPath path" '
- test_config core.hooksPath "$(pwd)/my-hooks" &&
+ hooks_path="$(pwd)/my-hooks" &&
+ test_config core.hooksPath "$hooks_path" &&
test_when_finished "rm my-hooks.ran" &&
test_must_fail git send-email \
--from="Example <nobody@example.com>" \
@@ -557,7 +558,7 @@ test_expect_success $PREREQ "--validate respects absolute core.hooksPath path" '
test_path_is_file my-hooks.ran &&
cat >expect <<-EOF &&
fatal: longline.patch: rejected by sendemail-validate hook
- fatal: command '"'"'$PWD/my-hooks/sendemail-validate'"'"' died with exit code 1
+ fatal: command '"'"'$hooks_path/sendemail-validate'"'"' died with exit code 1
warning: no patches were sent
EOF
test_cmp expect actual