git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-svn: respect Subversion's [auth] section configuration values

From
EREygene Ryabinkin <rea-git@codelabs.ru>
Date
Oct 6, 2007, 18:57 UTC
Message-ID
<20071006185719.GA3943@void.codelabs.ru>

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>
---
 git-svn.perl |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 484b057..f7ef421 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3051,6 +3051,29 @@ sub new {
 	  ]);
 	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,
-- 
1.5.3.2


-- 
Eygene
Next: Sam Vilain
Message 1 of 7 in “git-svn: respect Subversion's [auth] section configuration values”
  1. git-svn: respect Subversion's [auth] section configuration valuesEygene Ryabinkin, Oct 6, 2007
  2. Sam VilainOct 7, 2007
  3. Eric WongOct 7, 2007
  4. Eygene RyabinkinOct 7, 2007
  5. Eric WongOct 7, 2007
  6. Eygene RyabinkinOct 15, 2007
  7. Eric WongOct 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.