Skip to content

Commit 93ad8da

Browse files
committed
fixed init_bare
1 parent ef9395f commit 93ad8da

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

lib/git/repo.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,7 @@ def init_bare(self, path, mkdir=True, **kwargs):
271271
Returns
272272
``GitPython.Repo`` (the newly created repo)
273273
"""
274-
split = os.path.split(path)
275-
if split[-1] == '.git' or os.path.split(split[0])[-1] == '.git':
276-
gitpath = path
277-
else:
278-
gitpath = os.path.join(path, '.git')
279-
280-
if mkdir and not os.path.exists(gitpath):
281-
os.makedirs(gitpath, 0755)
282-
283-
git = Git(gitpath)
274+
git = Git(path)
284275
output = git.init(**kwargs)
285276
return Repo(path)
286277
create = init_bare

0 commit comments

Comments
 (0)