send-email: fix missing error message regression
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 24 May 2021 23:14:24 +0000 (01:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 25 May 2021 00:52:42 +0000 (09:52 +0900)
commit5b719b7552b9eca486a3a6507e9397572d16481d
tree6b5cc474e9c5ee714ae212caf6a7fe91548cba29
parentea7811b37e0e6fabb2a410475f198eab33110dcf
send-email: fix missing error message regression

Fix a regression with the "the editor exited uncleanly, aborting
everything" error message going missing after my
d21616c0394 (git-send-email: refactor duplicate $? checks into a
function, 2021-04-06).

I introduced a $msg variable, but did not actually use it. This caused
us to miss the optional error message supplied by the "do_edit"
codepath. Fix that, and add tests to check that this works.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl
t/t9001-send-email.sh