mirror of
https://github.com/git/git.git
synced 2026-01-17 14:21:57 +00:00
Do not mask the username when reading credentials
When user is asked for credentials there is no need to mask username, so PROMPT_ASKPASS flag on calling credential_ask_one for login is unnecessary. credential_ask_one internally uses git_prompt which in case of given flag PROMPT_ASKPASS uses masked input method instead of git_terminal_prompt, which does not mask user input. This fixes #675 Signed-off-by: yaras <yaras6@gmail.com>
This commit is contained in:
committed by
Johannes Schindelin
parent
1085d510a6
commit
593f444d67
@@ -136,7 +136,9 @@ static void credential_getpass(struct credential *c)
|
||||
{
|
||||
if (!c->username)
|
||||
c->username = credential_ask_one("Username", c,
|
||||
PROMPT_ASKPASS|PROMPT_ECHO);
|
||||
(getenv("GIT_ASKPASS") ?
|
||||
PROMPT_ASKPASS : 0) |
|
||||
PROMPT_ECHO);
|
||||
if (!c->password)
|
||||
c->password = credential_ask_one("Password", c,
|
||||
PROMPT_ASKPASS);
|
||||
|
||||
Reference in New Issue
Block a user