Skip to contentSkip to conversation

TestSupport: Don't use git proxy for non-git:// or http urls.

PATCH In review Ian Campbell 2 participants 2 messages Mar 17, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
v2: Also allow http:// and https://

---
 Osstest/TestSupport.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +3 -1
index b2f0b22..b6a6fb5 100644
@@ -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;
 }
 
Signature · 1 line
1.8.5.2
Acked-by on v2 1/1
#1 lore raw

Ian Campbell writes ("[PATCH OSSTEST v2] TestSupport: Don't use git proxy for non-git:// or http urls."):

Quoted 3 lines

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.