Skip to content

Commit f7a4cea

Browse files
kusmagitster
authored andcommitted
mingw: get rid of getpass implementation
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent afb4356 commit f7a4cea

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

compat/mingw.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,21 +1780,6 @@ int link(const char *oldpath, const char *newpath)
17801780
return 0;
17811781
}
17821782

1783-
char *getpass(const char *prompt)
1784-
{
1785-
struct strbuf buf = STRBUF_INIT;
1786-
1787-
fputs(prompt, stderr);
1788-
for (;;) {
1789-
char c = _getch();
1790-
if (c == '\r' || c == '\n')
1791-
break;
1792-
strbuf_addch(&buf, c);
1793-
}
1794-
fputs("\n", stderr);
1795-
return strbuf_detach(&buf, NULL);
1796-
}
1797-
17981783
pid_t waitpid(pid_t pid, int *status, int options)
17991784
{
18001785
HANDLE h = OpenProcess(SYNCHRONIZE | PROCESS_QUERY_INFORMATION,

compat/mingw.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ struct passwd {
5555
char *pw_dir;
5656
};
5757

58-
extern char *getpass(const char *prompt);
59-
6058
typedef void (__cdecl *sig_handler_t)(int);
6159
struct sigaction {
6260
sig_handler_t sa_handler;

0 commit comments

Comments
 (0)