This will use getpass_echo when set. Signed-off-by: Jeff King <peff@xxxxxxxx> --- prompt.c | 5 ++++- prompt.h | 1 + 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/prompt.c b/prompt.c index 7c8f9aa..c46227f 100644 --- a/prompt.c +++ b/prompt.c @@ -2,6 +2,7 @@ #include "run-command.h" #include "strbuf.h" #include "prompt.h" +#include "compat/getpass.h" static char *do_askpass(const char *cmd, const char *prompt, const char *name) { @@ -48,7 +49,9 @@ return do_askpass(askpass, prompt, name); } - return getpass(prompt); + return flags & PROMPT_ECHO ? + getpass_echo(prompt) : + getpass(prompt); } char *git_getpass(const char *prompt) diff --git a/prompt.h b/prompt.h index 18868c2..7201cae 100644 --- a/prompt.h +++ b/prompt.h @@ -2,6 +2,7 @@ #define PROMPT_H #define PROMPT_ASKPASS (1<<0) +#define PROMPT_ECHO (1<<1) char *git_prompt(const char *prompt, const char *name, int flags); char *git_getpass(const char *prompt); -- 1.7.7.4.7.g24824 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html