mingw: get rid of getpass implementation
authorErik Faye-Lund <kusmabite@gmail.com>
Tue, 4 Dec 2012 08:10:42 +0000 (09:10 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 4 Dec 2012 16:03:42 +0000 (08:03 -0800)
There's no remaining call-sites, and as pointed out in the
previous commit message, it's not quite ideal. So let's just
lose it.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c
compat/mingw.h
index c749a0259d3651dec6d85a6832cad297ef6aeb1d..34724c27815803c4440f7223a1bd84c1c2ba041a 100644 (file)
@@ -1780,21 +1780,6 @@ int link(const char *oldpath, const char *newpath)
        return 0;
 }
 
        return 0;
 }
 
-char *getpass(const char *prompt)
-{
-       struct strbuf buf = STRBUF_INIT;
-
-       fputs(prompt, stderr);
-       for (;;) {
-               char c = _getch();
-               if (c == '\r' || c == '\n')
-                       break;
-               strbuf_addch(&buf, c);
-       }
-       fputs("\n", stderr);
-       return strbuf_detach(&buf, NULL);
-}
-
 pid_t waitpid(pid_t pid, int *status, int options)
 {
        HANDLE h = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION,
 pid_t waitpid(pid_t pid, int *status, int options)
 {
        HANDLE h = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION,
index 68db8b7f7d26b399ee435ed03c6f4c2d3dfaa528..685cd2c3d4746521e047782f9630763044e42809 100644 (file)
@@ -55,8 +55,6 @@ struct passwd {
        char *pw_dir;
 };
 
        char *pw_dir;
 };
 
-extern char *getpass(const char *prompt);
-
 typedef void (__cdecl *sig_handler_t)(int);
 struct sigaction {
        sig_handler_t sa_handler;
 typedef void (__cdecl *sig_handler_t)(int);
 struct sigaction {
        sig_handler_t sa_handler;