Skip to content

Commit

Permalink
imap-send: don't check return value of git_getpass
Browse files Browse the repository at this point in the history
git_getpass will always die() if we weren't able to get
input, so there's no point looking for NULL.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Dec 13, 2011
1 parent 50d0158 commit 6c597ae
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions imap-send.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,10 +1213,6 @@ static struct store *imap_open_store(struct imap_server_conf *srvc)
strbuf_addf(&prompt, "Password (%s@%s): ", srvc->user, srvc->host);
arg = git_getpass(prompt.buf);
strbuf_release(&prompt);
if (!arg) {
perror("getpass");
exit(1);
}
if (!*arg) {
fprintf(stderr, "Skipping account %s@%s, no password\n", srvc->user, srvc->host);
goto bail;
Expand Down

0 comments on commit 6c597ae

Please sign in to comment.