diff mbox

[Xen-devel,OSSTEST,v2] TestSupport: Don't use git proxy for non-git:// or http urls.

Message ID 1395068339-21719-1-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell March 17, 2014, 2:58 p.m. UTC
After this I was stymied by ssh host keys and other roadblocks and just pushed
the branch to my xenbits tree but I think this is still correct as far as it
goes.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Also allow http:// and https://
---
 Osstest/TestSupport.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ian Jackson March 17, 2014, 3:52 p.m. UTC | #1
Ian Campbell writes ("[PATCH OSSTEST v2] TestSupport: Don't use git proxy for non-git:// or http urls."):
> After this I was stymied by ssh host keys and other roadblocks and
> just pushed the branch to my xenbits tree but I think this is still
> correct as far as it goes.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index b2f0b22..b6a6fb5 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -997,7 +997,9 @@  sub file_simple_write_contents ($$) {
 sub git_massage_url ($) {
     my ($url) = @_;
 
-    if ($c{GitCacheProxy}) { $url = $c{GitCacheProxy}.$url; }
+    if ($url =~ m,^(git|https?)://, && $c{GitCacheProxy}) {
+	$url = $c{GitCacheProxy}.$url;
+    }
     return $url;
 }