summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEygene Ryabinkin <rea-git@codelabs.ru>2007-10-06 18:57:19 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-10-16 01:28:48 (GMT)
commit602015e0e6ec5d3d79b71b0d5e2583fd015417e6 (patch)
tree1d9d1c241581b8f582e0a4ef16dc93196d7315c4 /git-svn.perl
parent24ccd8b88ee578d8ea1d2a9a7be9ec4cf225fe73 (diff)
downloadgit-602015e0e6ec5d3d79b71b0d5e2583fd015417e6.zip
git-602015e0e6ec5d3d79b71b0d5e2583fd015417e6.tar.gz
git-602015e0e6ec5d3d79b71b0d5e2583fd015417e6.tar.bz2
git-svn: respect Subversion's [auth] section configuration values
Parameters 'store-passwords' and 'store-auth-creds' from Subversion's configuration (~/.subversion/config) were not respected. This was fixed: the default values for these parameters are set to 'yes' to follow Subversion behaviour. Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru> Signed-off-by: Lars Hjemli <hjemli@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl23
1 files changed, 23 insertions, 0 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 777e436..2c8a158 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3065,6 +3065,29 @@ sub new {
my ($baton, $callbacks) = SVN::Core::auth_open_helper(_auth_providers);
my $config = SVN::Core::config_get_config($config_dir);
$RA = undef;
+ my $dont_store_passwords = 1;
+ my $conf_t = ${$config}{'config'};
+ {
+ # The usage of $SVN::_Core::SVN_CONFIG_* variables
+ # produces warnings that variables are used only once.
+ # I had not found the better way to shut them up, so
+ # warnings are disabled in this block.
+ no warnings;
+ if (SVN::_Core::svn_config_get_bool($conf_t,
+ $SVN::_Core::SVN_CONFIG_SECTION_AUTH,
+ $SVN::_Core::SVN_CONFIG_OPTION_STORE_PASSWORDS,
+ 1) == 0) {
+ SVN::_Core::svn_auth_set_parameter($baton,
+ $SVN::_Core::SVN_AUTH_PARAM_DONT_STORE_PASSWORDS,
+ bless (\$dont_store_passwords, "_p_void"));
+ }
+ if (SVN::_Core::svn_config_get_bool($conf_t,
+ $SVN::_Core::SVN_CONFIG_SECTION_AUTH,
+ $SVN::_Core::SVN_CONFIG_OPTION_STORE_AUTH_CREDS,
+ 1) == 0) {
+ $Git::SVN::Prompt::_no_auth_cache = 1;
+ }
+ }
my $self = SVN::Ra->new(url => $url, auth => $baton,
config => $config,
pool => SVN::Pool->new,