aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-04-05 14:49:58 +0200
committerGuido Günther <agx@sigxcpu.org>2012-04-05 14:50:27 +0200
commit1e68f6e3f33e0bdc62b286aa8e4f6ff4ec8cb304 (patch)
treeeeb9d099339c187309ffcb8ca400ba398f87b81a
parentb5a0b5532e8ed40c9f3ef07ae9ddab77482a6754 (diff)
gbp.git.repository: don't append a second .git
when mirroring a repository
-rw-r--r--gbp/git/repository.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 7b84d7d0..f342d46c 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1345,7 +1345,8 @@ class GitRepository(object):
if not name:
name = remote.rstrip('/').rsplit('/',1)[1]
if (mirror or bare):
- name = "%s.git" % name
+ if not name.endswith('.git'):
+ name = "%s.git" % name
elif name.endswith('.git'):
name = name[:-4]
return klass(os.path.join(abspath, name))