[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 02/13] git_massage_url: Make idempotent
If called more than once, it should not produce a url starting with multiple copies of the git cache proxy prefix. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index c95807a..1492d9f 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1028,7 +1028,8 @@ sub file_simple_write_contents ($$) { sub git_massage_url ($) { my ($url) = @_; - if ($url =~ m,^(git|https?)://, && $c{GitCacheProxy}) { + if ($url =~ m,^(git|https?)://, && $c{GitCacheProxy} && + substr($url,0,length($c{GitCacheProxy})) ne $c{GitCacheProxy}) { $url = $c{GitCacheProxy}.$url; } return $url; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |