fixed init_bare
authorFlorian Apolloner <florian@apolloner.eu>
Wed, 11 Jun 2008 14:49:25 +0000 (16:49 +0200)
committerFlorian Apolloner <florian@apolloner.eu>
Wed, 11 Jun 2008 14:49:25 +0000 (16:49 +0200)
lib/git/repo.py

index 015ce4a88d258e1d97180e37700d92fd321a003c..951c18d9aa9c0a750244d73bb849c997939d3c7c 100644 (file)
@@ -271,16 +271,7 @@ class Repo(object):
         Returns
             ``GitPython.Repo`` (the newly created repo)
         """
-        split = os.path.split(path)
-        if split[-1] == '.git' or os.path.split(split[0])[-1] == '.git':
-            gitpath = path
-        else:
-            gitpath = os.path.join(path, '.git')
-
-        if mkdir and not os.path.exists(gitpath):
-            os.makedirs(gitpath, 0755)
-
-        git = Git(gitpath)
+        git = Git(path)
         output = git.init(**kwargs)
         return Repo(path)
     create = init_bare