diff options
author | Guan Junchun <junchunx.guan@intel.com> | 2013-10-12 16:54:44 +0800 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-10-22 13:38:10 +0200 |
commit | 284eea5b0c7f4d6fbb09e4151ef02958e140fcf0 (patch) | |
tree | b9e51cfa43b3c726085e4b7978e84d98de98bdd1 /gbp/git | |
parent | 2438a7c0d4b60c90bb8492c8a47b801015e77daf (diff) | |
download | git-buildpackage-284eea5b0c7f4d6fbb09e4151ef02958e140fcf0.tar.gz git-buildpackage-284eea5b0c7f4d6fbb09e4151ef02958e140fcf0.tar.bz2 git-buildpackage-284eea5b0c7f4d6fbb09e4151ef02958e140fcf0.zip |
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>
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 5 |
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 |