diff options
author | Jonathan Tan <jonathantanmy@google.com> | 2017-06-02 02:50:55 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-02 04:58:25 +0300 |
commit | 177409e5897988f03e0c8111c94db6ea0466b138 (patch) | |
tree | 3065e4a03620792a5796e4ea27b1ea34f6d4e699 /t/t9001-send-email.sh | |
parent | 6489660b4bba7456fac0d0a41f5d6295c5900c5f (diff) |
send-email: check for repo before invoking hook
Unless --no-validate is passed, send-email will invoke
$repo->repo_path() in its search for a validate hook regardless of
whether a Git repo is actually present. Teach send-email to first check
for repo existence.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9001-send-email.sh')
-rwxr-xr-x | t/t9001-send-email.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 15128c755a..d1e4e8ad19 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -1953,4 +1953,12 @@ test_expect_success $PREREQ 'invoke hook' ' ) ' +test_expect_success $PREREQ 'test that send-email works outside a repo' ' + nongit git send-email \ + --from="Example <nobody@example.com>" \ + --to=nobody@example.com \ + --smtp-server="$(pwd)/fake.sendmail" \ + "$(pwd)/0001-add-master.patch" +' + test_done |