aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 7b84d7d..f342d46 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))