summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Matthijs Kooijman <matthijs@stdin.nl>2012-04-26 21:34:02 +0200
committerLibravatar Eric Wong <normalperson@yhbt.net>2012-04-27 08:28:54 +0000
commit082afee621aeb2d3746c8ae290af98823f981f34 (patch)
tree68693ae2e2d4b8eb5a897543f3438bae5ee45fbe
parentUpdate draft release notes to 1.7.11 (diff)
downloadtgif-082afee621aeb2d3746c8ae290af98823f981f34.tar.xz
git-svn: use platform specific auth providers
On Linux, this makes authentication using passwords from gnome-keyring and kwallet work (only the former was tested). On Mac OS X, this allows using the OS X Keychain. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Eric Wong <normalperson@yhbt.net>
-rwxr-xr-xgit-svn.perl20
1 files changed, 18 insertions, 2 deletions
diff --git a/git-svn.perl b/git-svn.perl
index f8e9ef0ea6..427da9e7a1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -5444,7 +5444,7 @@ BEGIN {
}
sub _auth_providers () {
- [
+ my @rv = (
SVN::Client::get_simple_provider(),
SVN::Client::get_ssl_server_trust_file_provider(),
SVN::Client::get_simple_prompt_provider(
@@ -5460,7 +5460,23 @@ sub _auth_providers () {
\&Git::SVN::Prompt::ssl_server_trust),
SVN::Client::get_username_prompt_provider(
\&Git::SVN::Prompt::username, 2)
- ]
+ );
+
+ # earlier 1.6.x versions would segfault, and <= 1.5.x didn't have
+ # this function
+ if ($SVN::Core::VERSION gt '1.6.12') {
+ my $config = SVN::Core::config_get_config($config_dir);
+ my ($p, @a);
+ # config_get_config returns all config files from
+ # ~/.subversion, auth_get_platform_specific_client_providers
+ # just wants the config "file".
+ @a = ($config->{'config'}, undef);
+ $p = SVN::Core::auth_get_platform_specific_client_providers(@a);
+ # Insert the return value from
+ # auth_get_platform_specific_providers
+ unshift @rv, @$p;
+ }
+ \@rv;
}
sub escape_uri_only {