diff options
Diffstat (limited to 'lib/git/repo.py')
-rw-r--r-- | lib/git/repo.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/git/repo.py b/lib/git/repo.py index 951c18d9..f531617d 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -271,6 +271,10 @@ class Repo(object): Returns ``GitPython.Repo`` (the newly created repo) """ + + if mkdir and not os.path.exists(gitpath): + os.makedirs(gitpath, 0755) + git = Git(path) output = git.init(**kwargs) return Repo(path) |