From 6d483ee8323479ab4b8cca41d7033c69f880971f Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 24 May 2016 08:08:02 -0500 Subject: [PATCH] vcs: Add support for git.openstack.org Go is being proposed as an officially supported language for elements of OpenStack: https://review.openstack.org/#/c/312267/ As such, repos that exist in OpenStack's git infrastructure are likely to become places from which people might want to go get things. Allow optional .git suffixes to allow writing code that depends on git.openstack.org repos that will work with older go versions while we wait for this support to roll out. Change-Id: I1f7be6b7aae63f9c554dbcdbfa46855bcff321df Reviewed-on: https://go-review.googlesource.com/23362 Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- go/vcs/vcs.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/go/vcs/vcs.go b/go/vcs/vcs.go index 45bd814f..58299046 100644 --- a/go/vcs/vcs.go +++ b/go/vcs/vcs.go @@ -625,6 +625,15 @@ var vcsPaths = []*vcsPath{ check: launchpadVCS, }, + // Git at OpenStack + { + prefix: "git.openstack.org", + re: `^(?Pgit\.openstack\.org/[A-Za-z0-9_.\-]+/[A-Za-z0-9_.\-]+)(\.git)?(/[A-Za-z0-9_.\-]+)*$`, + vcs: "git", + repo: "https://{root}", + check: noVCSSuffix, + }, + // General syntax for any server. { re: `^(?P(?P([a-z0-9.\-]+\.)+[a-z0-9.\-]+(:[0-9]+)?/[A-Za-z0-9_.\-/]*?)\.(?Pbzr|git|hg|svn))(/[A-Za-z0-9_.\-]+)*$`,