소스 검색

Repo.init: Fix mkdir argument; default to False for the moment as that's consistent with existing behaviour.

Jelmer Vernooij 14 년 전
부모
커밋
612e26d37b
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      dulwich/repo.py

+ 4 - 2
dulwich/repo.py

@@ -1187,14 +1187,16 @@ class Repo(BaseRepo):
         return "<Repo at %r>" % self.path
 
     @classmethod
-    def init(cls, path, mkdir=True):
+    def init(cls, path, mkdir=False):
+        if mkdir:
+            os.mkdir(path)
         controldir = os.path.join(path, ".git")
         os.mkdir(controldir)
         cls.init_bare(controldir)
         return cls(path)
 
     @classmethod
-    def init_bare(cls, path, mkdir=True):
+    def init_bare(cls, path):
         for d in BASE_DIRECTORIES:
             os.mkdir(os.path.join(path, *d))
         DiskObjectStore.init(os.path.join(path, OBJECTDIR))