diff mbox

[Xen-devel,OSSTEST] cri-common: Only use git proxy for git, http and https URLs

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

Commit Message

Ian Campbell April 25, 2014, 3:15 p.m. UTC
For testing I had ap-fetch-version-old returning a file:// URL to a local repo.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 cri-common | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Ian Jackson April 30, 2014, 3:15 p.m. UTC | #1
Ian Campbell writes ("[OSSTEST] cri-common: Only use git proxy for git, http and https URLs"):
> For testing I had ap-fetch-version-old returning a file:// URL to a local repo.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell May 1, 2014, 4:03 p.m. UTC | #2
On Wed, 2014-04-30 at 16:15 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[OSSTEST] cri-common: Only use git proxy for git, http and https URLs"):
> > For testing I had ap-fetch-version-old returning a file:// URL to a local repo.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks, pushed.
diff mbox

Patch

diff --git a/cri-common b/cri-common
index f472927..d82312c 100644
--- a/cri-common
+++ b/cri-common
@@ -26,7 +26,12 @@  repo_tree_rev_fetch_git () {
 	local remoteurl=$2
 	local remotetag=$3
 	local localtag=$4
-	local realurl="`getconfig GitCacheProxy`$remoteurl"
+	case $remoteurl in
+	git://*|http://*|https://*)
+		local realurl="`getconfig GitCacheProxy`$remoteurl" ;;
+	*)
+		local realurl="$remoteurl" ;;
+	esac
 	if ! test -d $repos/$treename; then
 	        git clone --bare $realurl $repos/$treename >&2
 	fi