aboutsummaryrefslogtreecommitdiff
path: root/prompt.c
diff options
context:
space:
mode:
Diffstat (limited to 'prompt.c')
-rw-r--r--prompt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/prompt.c b/prompt.c
index 20026444c..72ab9de2f 100644
--- a/prompt.c
+++ b/prompt.c
@@ -2,6 +2,7 @@
#include "run-command.h"
#include "strbuf.h"
#include "prompt.h"
+#include "compat/terminal.h"
static char *do_askpass(const char *cmd, const char *prompt)
{
@@ -50,7 +51,7 @@ char *git_prompt(const char *prompt, int flags)
return do_askpass(askpass, prompt);
}
- r = getpass(prompt);
+ r = git_terminal_prompt(prompt, flags & PROMPT_ECHO);
if (!r)
die_errno("could not read '%s'", prompt);
return r;