Skip to content

Commit

Permalink
mingw: get rid of getpass implementation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Faye-Lund authored and Junio C Hamano committed Dec 4, 2012
1 parent afb4356 commit f7a4cea
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
15 changes: 0 additions & 15 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,21 +1780,6 @@ int link(const char *oldpath, const char *newpath)
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,
Expand Down
2 changes: 0 additions & 2 deletions compat/mingw.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ struct passwd {
char *pw_dir;
};

extern char *getpass(const char *prompt);

typedef void (__cdecl *sig_handler_t)(int);
struct sigaction {
sig_handler_t sa_handler;
Expand Down

0 comments on commit f7a4cea

Please sign in to comment.