]> git.ipfire.org Git - thirdparty/git.git/commit - git-send-email.perl
send-email: validate & reconfirm interactive responses
authorJunio C Hamano <gitster@pobox.com>
Tue, 14 Aug 2012 22:15:53 +0000 (15:15 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Aug 2012 22:38:32 +0000 (15:38 -0700)
commit51bbccfd1b4a9e2807413022c56ab05c835164fb
treec980c1162e1239193f070a58a4e09306663e6761
parent829a1c616967176ccd859c18a6e8ca0dda77f75a
send-email: validate & reconfirm interactive responses

People answer 'y' to "Who should the emails appear to be from?"  and
'n' to "Message-ID to be used as In-Reply-To for the first email?"
for some unknown reason.  While it is possible that your local
username really is "y" and you are sending the mail to your local
colleagues, it is possible, and some might even say it is likely,
that it is a user error.

Fortunately, our interactive prompter already has input validation
mechanism built-in.  Enhance it so that we can optionally reconfirm
and allow the user to pass an input that does not validate, and
"softly" require input to the sender, in-reply-to, and recipient to
contain "@" and "." in this order, which would catch most cases of
mistakes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl