refactor git_getpass into generic prompt function

This will allow callers to specify more options (e.g.,
leaving echo on). The original git_getpass becomes a slim
wrapper around the new function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2011-12-10 05:40:57 -05:00
committed by Junio C Hamano
parent d3c58b83ae
commit 1cb0134f34
2 changed files with 33 additions and 16 deletions

View File

@ -1,6 +1,9 @@
#ifndef PROMPT_H
#define PROMPT_H
#define PROMPT_ASKPASS (1<<0)
char *git_prompt(const char *prompt, int flags);
char *git_getpass(const char *prompt);
#endif /* PROMPT_H */