diff options
author | Matthieu Moy <Matthieu.Moy@imag.fr> | 2011-09-28 15:48:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-09-28 15:20:23 -0700 |
commit | 1d6abac9d573d7a40d3e631253b67a7cb07e0d05 (patch) | |
tree | ad5a77ef82d909c237affcc77dd5411fc5b76c73 /contrib/mw-to-git | |
parent | git-remote-mediawiki: obey advice.pushNonFastForward (diff) | |
download | tgif-1d6abac9d573d7a40d3e631253b67a7cb07e0d05.tar.xz |
git-remote-mediawiki: allow a domain to be set for authentication
When the wiki uses e.g. LDAP for authentication, the web interface shows
a popup to allow the user to chose an authentication domain, and we need
to use lgdomain in the API at login time.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/mw-to-git')
-rwxr-xr-x | contrib/mw-to-git/git-remote-mediawiki | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki index b809792853..0b32d18eaa 100755 --- a/contrib/mw-to-git/git-remote-mediawiki +++ b/contrib/mw-to-git/git-remote-mediawiki @@ -76,8 +76,10 @@ my $wiki_login = run_git("config --get remote.". $remotename .".mwLogin"); # inside a remote helper, so our stdin is connect to git, not to a # terminal. my $wiki_passwd = run_git("config --get remote.". $remotename .".mwPassword"); +my $wiki_domain = run_git("config --get remote.". $remotename .".mwDomain"); chomp($wiki_login); chomp($wiki_passwd); +chomp($wiki_domain); # Import only last revisions (both for clone and fetch) my $shallow_import = run_git("config --get --bool remote.". $remotename .".shallow"); @@ -158,6 +160,7 @@ sub mw_connect_maybe { if (!$mediawiki->login({ lgname => $wiki_login, lgpassword => $wiki_passwd, + lgdomain => $wiki_domain, })) { print STDERR "Failed to log in mediawiki user \"$wiki_login\" on $url\n"; print STDERR "(error " . |