summaryrefslogtreecommitdiff
path: root/connect.c
diff options
context:
space:
mode:
authorAnselm Kruis <a.kruis@science-computing.de>2010-08-30 13:38:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-31 17:49:02 (GMT)
commitd3e7da8979f6ee3edd88fe53241095921d578285 (patch)
tree8d552c146371757f1fddfad301148d5265424c60 /connect.c
parent64fdc08dac6694d1e754580e7acb82dfa4988bb9 (diff)
downloadgit-d3e7da8979f6ee3edd88fe53241095921d578285.zip
git-d3e7da8979f6ee3edd88fe53241095921d578285.tar.gz
git-d3e7da8979f6ee3edd88fe53241095921d578285.tar.bz2
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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/connect.c b/connect.c
index 02e738a..e296bfc 100644
--- a/connect.c
+++ b/connect.c
@@ -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);