Browse Source

Return result Repo object.

Jelmer Vernooij 16 years ago
parent
commit
3a7196108e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      dulwich/repo.py

+ 2 - 0
dulwich/repo.py

@@ -348,6 +348,7 @@ class Repo(object):
         controldir = os.path.join(path, ".git")
         os.mkdir(controldir)
         cls.init_bare(controldir)
+        return cls(path)
 
     @classmethod
     def init_bare(cls, path, mkdir=True):
@@ -364,6 +365,7 @@ class Repo(object):
         open(os.path.join(path, 'HEAD'), 'w').write("ref: refs/heads/master\n")
         open(os.path.join(path, 'description'), 'w').write("Unnamed repository")
         open(os.path.join(path, 'info', 'excludes'), 'w').write("")
+        return cls(path)
 
     create = init_bare