Skip to content

Commit 6134925

Browse files
committed
fixup! Do not mask the username when reading credentials
This fixes t0300 and t0302 which rely on GIT_ASKPASS to be respected even when querying the username. And if those tests rely on that feature we can be certain that other callers rely on it, too (think UIs). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 9f3f612 commit 6134925

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

credential.c

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

0 commit comments

Comments
 (0)