Skip to contentSkip to conversation

cri-common: Only use git proxy for git, http and https URLs

OSSTEST Ian Campbell 2 participants 3 messages Apr 25, 2014 – May 1, 2014

lore
Share & tools
lore
#0 lore raw

For testing I had ap-fetch-version-old returning a file:// URL to a local repo.

---
 cri-common | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
cri-common +6 -1
index f472927..d82312c 100644
@@ -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
Signature · 1 line
1.9.0
Acked-by
#1 lore raw

Ian Campbell writes ("[OSSTEST] cri-common: Only use git proxy for git, http and https URLs"):

Quoted 1 line

For testing I had ap-fetch-version-old returning a file:// URL to a local repo.

#2 lore raw
Quoted 4 lines · Ian Jackson

Ian Campbell writes ("[OSSTEST] cri-common: Only use git proxy for git, http and https URLs"):

Quoted 1 line

For testing I had ap-fetch-version-old returning a file:// URL to a local repo.

Thanks, pushed.