diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-04-05 14:49:58 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-04-05 14:50:27 +0200 |
commit | 1e68f6e3f33e0bdc62b286aa8e4f6ff4ec8cb304 (patch) | |
tree | eeb9d099339c187309ffcb8ca400ba398f87b81a | |
parent | b5a0b5532e8ed40c9f3ef07ae9ddab77482a6754 (diff) |
gbp.git.repository: don't append a second .git
when mirroring a repository
-rw-r--r-- | gbp/git/repository.py | 3 |
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)) |