diff options
author | Anselm Kruis <a.kruis@science-computing.de> | 2010-08-30 15:38:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 10:49:02 -0700 |
commit | d3e7da8979f6ee3edd88fe53241095921d578285 (patch) | |
tree | 8d552c146371757f1fddfad301148d5265424c60 /connect.c | |
parent | 64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff) | |
download | git-d3e7da8979f6ee3edd88fe53241095921d578285.tar.gz |
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>
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |