{"thread":{"id":"7843","subject":"[PATCH] git-svn: Ignore usernames in URLs in find_by_url","startedAt":"2007-04-25T19:42:58Z","lastAt":"2007-04-25T21:01:16Z","messageCount":2,"participants":["Adam Roben","Eric Wong"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"40428","messageId":"1177530178545-git-send-email-aroben@apple.com","threadId":"7843","inReplyTo":null,"subject":"[PATCH] git-svn: Ignore usernames in URLs in find_by_url","fromName":"Adam Roben","fromEmail":"aroben@apple.com","sentAt":"2007-04-25T19:42:58Z","receivedAt":"2007-04-25T19:42:58Z","isPatch":true,"sender":{"key":"aroben@apple.com","avatar":"https://gravatar.com/avatar/9d3697e1de53890adf241331f4b970bdd2b18962b2ff0b8028ebb00e085807f8?d=mp&s=160"},"body":"Usernames don't matter for the purposes of find_by_url, so always remove them\nbefore doing any comparisons.\n\nSigned-off-by: Adam Roben <aroben@apple.com>\n---\n git-svn.perl |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/git-svn.perl b/git-svn.perl\nindex 90f3bc1..59008cc 100755\n--- a/git-svn.perl\n+++ b/git-svn.perl\n@@ -1064,6 +1064,8 @@ sub init_remote_config {\n \n sub find_by_url { # repos_root and, path are optional\n \tmy ($class, $full_url, $repos_root, $path) = @_;\n+\tremove_username($full_url);\n+\tremove_username($repos_root) if defined $repos_root;\n \treturn undef unless defined $full_url;\n \tmy $remotes = read_all_remotes();\n \tif (defined $full_url && defined $repos_root && !defined $path) {\n@@ -1072,6 +1074,7 @@ sub find_by_url { # repos_root and, path are optional\n \t}\n \tforeach my $repo_id (keys %$remotes) {\n \t\tmy $u = $remotes->{$repo_id}->{url} or next;\n+\t\tremove_username($u);\n \t\tnext if defined $repos_root && $repos_root ne $u;\n \n \t\tmy $fetch = $remotes->{$repo_id}->{fetch} || {};\n-- \n1.5.2.rc0.16.ge10ca-dirty\n"},{"id":"40452","messageId":"20070425210116.GB12375@untitled","threadId":"7843","inReplyTo":"1177530178545-git-send-email-aroben@apple.com","subject":"Re: [PATCH] git-svn: Ignore usernames in URLs in find_by_url","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2007-04-25T21:01:16Z","receivedAt":"2007-04-25T21:01:16Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Adam Roben <aroben@apple.com> wrote:\n> Usernames don't matter for the purposes of find_by_url, so always remove them\n> before doing any comparisons.\n \n> Signed-off-by: Adam Roben <aroben@apple.com>\n> ---\n>  git-svn.perl |    3 +++\n>  1 files changed, 3 insertions(+), 0 deletions(-)\n> \n> diff --git a/git-svn.perl b/git-svn.perl\n> index 90f3bc1..59008cc 100755\n> --- a/git-svn.perl\n> +++ b/git-svn.perl\n> @@ -1064,6 +1064,8 @@ sub init_remote_config {\n>  \n>  sub find_by_url { # repos_root and, path are optional\n>  \tmy ($class, $full_url, $repos_root, $path) = @_;\n> +\tremove_username($full_url);\n> +\tremove_username($repos_root) if defined $repos_root;\n>  \treturn undef unless defined $full_url;\n\t^-- this line should probably be moved up\n\nOtherwise,\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n>  \tmy $remotes = read_all_remotes();\n>  \tif (defined $full_url && defined $repos_root && !defined $path) {\n> @@ -1072,6 +1074,7 @@ sub find_by_url { # repos_root and, path are optional\n>  \t}\n>  \tforeach my $repo_id (keys %$remotes) {\n>  \t\tmy $u = $remotes->{$repo_id}->{url} or next;\n> +\t\tremove_username($u);\n>  \t\tnext if defined $repos_root && $repos_root ne $u;\n>  \n>  \t\tmy $fetch = $remotes->{$repo_id}->{fetch} || {};\n> -- \n> 1.5.2.rc0.16.ge10ca-dirty\n-- \nEric Wong\n"}]}