From: Adam Roben <aroben@apple.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: git@vger.kernel.org, Adam Roben <aroben@apple.com>
Subject: [PATCH] git-svn: Ignore usernames in URLs in find_by_url
Date: Wed, 25 Apr 2007 12:42:58 -0700 [thread overview]
Message-ID: <1177530178545-git-send-email-aroben@apple.com> (raw)
Usernames don't matter for the purposes of find_by_url, so always remove them
before doing any comparisons.
Signed-off-by: Adam Roben <aroben@apple.com>
---
git-svn.perl | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index 90f3bc1..59008cc 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1064,6 +1064,8 @@ sub init_remote_config {
sub find_by_url { # repos_root and, path are optional
my ($class, $full_url, $repos_root, $path) = @_;
+ remove_username($full_url);
+ remove_username($repos_root) if defined $repos_root;
return undef unless defined $full_url;
my $remotes = read_all_remotes();
if (defined $full_url && defined $repos_root && !defined $path) {
@@ -1072,6 +1074,7 @@ sub find_by_url { # repos_root and, path are optional
}
foreach my $repo_id (keys %$remotes) {
my $u = $remotes->{$repo_id}->{url} or next;
+ remove_username($u);
next if defined $repos_root && $repos_root ne $u;
my $fetch = $remotes->{$repo_id}->{fetch} || {};
--
1.5.2.rc0.16.ge10ca-dirty
next reply other threads:[~2007-04-25 19:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 19:42 Adam Roben [this message]
2007-04-25 21:01 ` [PATCH] git-svn: Ignore usernames in URLs in find_by_url Eric Wong
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=1177530178545-git-send-email-aroben@apple.com \
--to=aroben@apple.com \
--cc=git@vger.kernel.org \
--cc=normalperson@yhbt.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.