Make git-p4 work with bare repositories.
Signed-off-by: Simon Hausmann <simon@lst.de>
This commit is contained in:
parent
cd6cc0d318
commit
81f2373f89
@ -1185,9 +1185,7 @@ if cmd.needsGit:
|
|||||||
if len(gitdir) == 0:
|
if len(gitdir) == 0:
|
||||||
gitdir = ".git"
|
gitdir = ".git"
|
||||||
if not isValidGitDir(gitdir):
|
if not isValidGitDir(gitdir):
|
||||||
cdup = mypopen("git rev-parse --show-cdup").read()[:-1]
|
gitdir = mypopen("git rev-parse --git-dir").read()[:-1]
|
||||||
if isValidGitDir(cdup + "/" + gitdir):
|
|
||||||
os.chdir(cdup)
|
|
||||||
|
|
||||||
if not isValidGitDir(gitdir):
|
if not isValidGitDir(gitdir):
|
||||||
if isValidGitDir(gitdir + "/.git"):
|
if isValidGitDir(gitdir + "/.git"):
|
||||||
|
Loading…
Reference in New Issue
Block a user