Merge branch 'ja/i18n-fix'
[gitweb.git] / prompt.c
index 35ddbfab0cc01899936e8eb4e45e6c7ac8981dd8..6d5885d0096407d7d12f4511100ebee5cb5f752d 100644 (file)
--- a/prompt.c
+++ b/prompt.c
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "config.h"
 #include "run-command.h"
 #include "strbuf.h"
 #include "prompt.h"
@@ -6,7 +7,7 @@
 
 static char *do_askpass(const char *cmd, const char *prompt)
 {
-       struct child_process pass;
+       struct child_process pass = CHILD_PROCESS_INIT;
        const char *args[3];
        static struct strbuf buffer = STRBUF_INIT;
        int err = 0;
@@ -15,7 +16,6 @@ static char *do_askpass(const char *cmd, const char *prompt)
        args[1] = prompt;
        args[2] = NULL;
 
-       memset(&pass, 0, sizeof(pass));
        pass.argv = args;
        pass.out = -1;
 
@@ -74,8 +74,3 @@ char *git_prompt(const char *prompt, int flags)
        }
        return r;
 }
-
-char *git_getpass(const char *prompt)
-{
-       return git_prompt(prompt, PROMPT_ASKPASS);
-}