Add a new option 'core.askpass'.
Setting this option has the same effect as setting the environment variable 'GIT_ASKPASS'. Signed-off-by: Knut Franke <k.franke@science-computing.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
64fdc08dac
commit
d3e7da8979
@ -621,12 +621,14 @@ int finish_connect(struct child_process *conn)
|
||||
|
||||
char *git_getpass(const char *prompt)
|
||||
{
|
||||
char *askpass;
|
||||
const char *askpass;
|
||||
struct child_process pass;
|
||||
const char *args[3];
|
||||
static struct strbuf buffer = STRBUF_INIT;
|
||||
|
||||
askpass = getenv("GIT_ASKPASS");
|
||||
if (!askpass)
|
||||
askpass = askpass_program;
|
||||
|
||||
if (!askpass || !(*askpass))
|
||||
return getpass(prompt);
|
||||
|
Reference in New Issue
Block a user