diff options
author | Paul Jimenez <pj@place.org> | 2014-07-23 11:57:20 -0400 |
---|---|---|
committer | Leandro Lucarella <leandro.lucarella@sociomantic.com> | 2014-10-23 16:48:54 +0200 |
commit | dac2d775de52c06730eb35203eb465b66a121e89 (patch) | |
tree | 167697e7156e3b10b6b2045cefa8c3f9174c478c | |
parent | 778945b1e4b482487346e7520f508a77f9b9fe05 (diff) |
Accept an http URL as a repository location
Fix #95
-rwxr-xr-x | git-hub | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -744,9 +744,11 @@ class CloneCmd (object): @classmethod def run(cls, parser, args): - upstream = args.repository + from urlparse import urlsplit + upstream = urlsplit(args.repository).path + if upstream.endswith('.git'): upstream = upstream[:-4] if '/' in upstream: - (owner, proj) = upstream.split('/', 1) + (owner, proj) = upstream.split('/')[-2:] for repo in req.get('/user/repos'): if repo['name'] == proj and repo['fork']: break |