git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-svn: Ignore usernames in URLs in find_by_url
@ 2007-04-25 19:42 Adam Roben
  2007-04-25 21:01 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Roben @ 2007-04-25 19:42 UTC (permalink / raw)
  To: Eric Wong; +Cc: git, Adam Roben

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-25 21:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25 19:42 [PATCH] git-svn: Ignore usernames in URLs in find_by_url Adam Roben
2007-04-25 21:01 ` Eric Wong

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).