summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 64fdc08)
raw | patch | inline | side by side (parent: 64fdc08)
author | Anselm Kruis <a.kruis@science-computing.de> | |
Mon, 30 Aug 2010 13:38:38 +0000 (15:38 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 31 Aug 2010 17:49:02 +0000 (10:49 -0700) |
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>
'GIT_ASKPASS'.
Signed-off-by: Knut Franke <k.franke@science-computing.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
cache.h | patch | blob | history | |
config.c | patch | blob | history | |
connect.c | patch | blob | history | |
environment.c | patch | blob | history |
index e75434b3ef2d81fa8dafd552d4b689eb84eea441..b9ab7dfa01da60b84ba7eb84d727320d54ec5932 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
to the value of `$HOME` and "{tilde}user/" to the specified user's
home directory. See linkgit:gitignore[5].
+core.askpass::
+ Some commands (e.g. svn and http interfaces) that interactively
+ ask for a password can be told to use an external program given
+ via the value of this variable when it is set, and the
+ environment variable `GIT_ASKPASS` is not set.
+
core.editor::
Commands such as `commit` and `tag` that lets you edit
messages by launching an editor uses the value of this
index c9fa3df7f5b343ecea980ceb423e7c23d2eb22b2..c74275727ebd2042b5631abf9eacfd2021c92e0f 100644 (file)
--- a/cache.h
+++ b/cache.h
extern int pager_use_color;
extern const char *editor_program;
+extern const char *askpass_program;
extern const char *excludes_file;
/* base85 */
diff --git a/config.c b/config.c
index cdcf5836c6c374eb59e80f89dbcf525fd6bf780f..ac55730fa712e899773be8b53596d4203e057784 100644 (file)
--- a/config.c
+++ b/config.c
if (!strcmp(var, "core.editor"))
return git_config_string(&editor_program, var, value);
+ if (!strcmp(var, "core.askpass"))
+ return git_config_string(&askpass_program, var, value);
+
if (!strcmp(var, "core.excludesfile"))
return git_config_pathname(&excludes_file, var, value);
diff --git a/connect.c b/connect.c
index 02e738a0146a5c46aaf3f1d8edc3c055a99e98b9..e296bfca1896b432376ea98cf92db46d7120a062 100644 (file)
--- a/connect.c
+++ b/connect.c
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);
diff --git a/environment.c b/environment.c
index 83d38d3c2354e8582d5af91c6d529a2f2836dc2c..e7760d8198323e26c647b2854d3bc3a780b8443d 100644 (file)
--- a/environment.c
+++ b/environment.c
const char *pager_program;
int pager_use_color = 1;
const char *editor_program;
+const char *askpass_program;
const char *excludes_file;
enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
int read_replace_refs = 1;