diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-08 09:17:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-08 09:17:01 -0700 |
commit | b815a726e9da97924b44d551b10d3fef3b3d1885 (patch) | |
tree | a1d0fe2b25ce93d7e1e4aad225b551018d3ca22e /connect.c | |
parent | e250c5914fd151caf228cbda6c30560c266bcfef (diff) | |
parent | 453842c9b81c6bb1328b0dfc351745615004a77f (diff) | |
download | git-b815a726e9da97924b44d551b10d3fef3b3d1885.tar.gz |
Merge branch 'kf/askpass-config'
* kf/askpass-config:
Extend documentation of core.askpass and GIT_ASKPASS.
Allow core.askpass to override SSH_ASKPASS.
Add a new option 'core.askpass'.
Diffstat (limited to 'connect.c')
-rw-r--r-- | connect.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -621,13 +621,16 @@ 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 = getenv("SSH_ASKPASS"); if (!askpass || !(*askpass)) return getpass(prompt); |