Skip to content

Commit 56f6eca

Browse files
committed
Merge pull request #677 from yaras/fix-git-675
Fixed masking username with asterisks when reading credentials
2 parents dd40762 + e851f8e commit 56f6eca

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
@@ -135,7 +135,9 @@ static void credential_getpass(struct credential *c)
135135
{
136136
if (!c->username)
137137
c->username = credential_ask_one("Username", c,
138-
PROMPT_ASKPASS|PROMPT_ECHO);
138+
(getenv("GIT_ASKPASS") ?
139+
PROMPT_ASKPASS : 0) |
140+
PROMPT_ECHO);
139141
if (!c->password)
140142
c->password = credential_ask_one("Password", c,
141143
PROMPT_ASKPASS);

0 commit comments

Comments
 (0)