aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuan Junchun <junchunx.guan@intel.com>2013-10-12 16:54:44 +0800
committerGuido G√ľnther <agx@sigxcpu.org>2013-10-22 13:38:10 +0200
commit284eea5b0c7f4d6fbb09e4151ef02958e140fcf0 (patch)
treeb9e51cfa43b3c726085e4b7978e84d98de98bdd1
parent2438a7c0d4b60c90bb8492c8a47b801015e77daf (diff)
gbp-clone: support repo URLs like "host:repo.git"
Previously, gbp didn't correctly parse this kind of URL and clone failed. Signed-off-by: Guan Junchun <junchunx.guan@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--gbp/git/repository.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index cc723df4..7e0b3299 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1851,7 +1851,10 @@ class GitRepository(object):
raise GitRepositoryError("Error running git clone: %s" % stderr)
if not name:
- name = remote.rstrip('/').rsplit('/',1)[1]
+ try:
+ name = remote.rstrip('/').rsplit('/',1)[1]
+ except IndexError:
+ name = remote.split(':', 1)[1]
if (mirror or bare):
if not name.endswith('.git'):
name = "%s.git" % name