git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Monard Vong <travelingsoul86@gmail.com>
To: git@vger.kernel.org
Cc: Monard Vong <travelingsoul86@gmail.com>
Subject: [PATCH] git-svn: Avoid systematic prompt for client certificate when using "git svn branch"
Date: Thu, 24 Jul 2014 18:25:59 +0200	[thread overview]
Message-ID: <1406219159-4644-1-git-send-email-travelingsoul86@gmail.com> (raw)
In-Reply-To: <254135>

When a client certificate is required to connect to a Subversion repository,
the certificate location and password may be stored in Subversion config directory.
Commands like "git svn init/fetch/dcommit" do not prompt for client certificate/password
if the location is set in SVN config file, but "git svn branch" does not use the config
directory, resulting in prompting for certificate location/password all the time.

Build instance of SVN::Client in branch_cmd() with SVN config directory option instead
of authentication baton. SVN::Client then builds its own authentication baton
using information from the config directory.

Signed-off-by: Monard Vong <travelingsoul86@gmail.com>
---
 git-svn.perl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/git-svn.perl b/git-svn.perl
index 0a32372..1f41ee1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1161,7 +1161,9 @@ sub cmd_branch {
 	::_req_svn();
 
 	my $ctx = SVN::Client->new(
-		auth    => Git::SVN::Ra::_auth_providers(),
+		config => SVN::Core::config_get_config(
+			$Git::SVN::Ra::config_dir
+		),
 		log_msg => sub {
 			${ $_[0] } = defined $_message
 				? $_message
-- 
1.9.3

       reply	other threads:[~2014-07-24 16:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <254135>
2014-07-24 16:25 ` Monard Vong [this message]
2014-08-02 10:07   ` [PATCH] git-svn: Avoid systematic prompt for client certificate when using "git svn branch" Eric Wong
2014-08-02 13:26     ` Monard Vong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406219159-4644-1-git-send-email-travelingsoul86@gmail.com \
    --to=travelingsoul86@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).