Skip to content

Commit c7f4d21

Browse files
committed
Merge pull request #677 from yaras/fix-git-675
Fixed masking username with asterisks when reading credentials
2 parents ba99f9b + a284435 commit c7f4d21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

credential.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ static void credential_getpass(struct credential *c)
132132
{
133133
if (!c->username)
134134
c->username = credential_ask_one("Username", c,
135-
PROMPT_ASKPASS|PROMPT_ECHO);
135+
(getenv("GIT_ASKPASS") ?
136+
PROMPT_ASKPASS : 0) |
137+
PROMPT_ECHO);
136138
if (!c->password)
137139
c->password = credential_ask_one("Password", c,
138140
PROMPT_ASKPASS);

0 commit comments

Comments
 (0)