Skip to content

Commit 082afee

Browse files
matthijskooijmanEric Wong
authored andcommitted
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 <[email protected]> Acked-by: Eric Wong <[email protected]>
1 parent 010b260 commit 082afee

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

git-svn.perl

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5444,7 +5444,7 @@ BEGIN
54445444
}
54455445

54465446
sub _auth_providers () {
5447-
[
5447+
my @rv = (
54485448
SVN::Client::get_simple_provider(),
54495449
SVN::Client::get_ssl_server_trust_file_provider(),
54505450
SVN::Client::get_simple_prompt_provider(
@@ -5460,7 +5460,23 @@ ()
54605460
\&Git::SVN::Prompt::ssl_server_trust),
54615461
SVN::Client::get_username_prompt_provider(
54625462
\&Git::SVN::Prompt::username, 2)
5463-
]
5463+
);
5464+
5465+
# earlier 1.6.x versions would segfault, and <= 1.5.x didn't have
5466+
# this function
5467+
if ($SVN::Core::VERSION gt '1.6.12') {
5468+
my $config = SVN::Core::config_get_config($config_dir);
5469+
my ($p, @a);
5470+
# config_get_config returns all config files from
5471+
# ~/.subversion, auth_get_platform_specific_client_providers
5472+
# just wants the config "file".
5473+
@a = ($config->{'config'}, undef);
5474+
$p = SVN::Core::auth_get_platform_specific_client_providers(@a);
5475+
# Insert the return value from
5476+
# auth_get_platform_specific_providers
5477+
unshift @rv, @$p;
5478+
}
5479+
\@rv;
54645480
}
54655481

54665482
sub escape_uri_only {

0 commit comments

Comments
 (0)