Browse Source

Make git-p4 work with bare repositories.

Signed-off-by: Simon Hausmann <simon@lst.de>
maint
Simon Hausmann 18 years ago
parent
commit
81f2373f89
  1. 4
      contrib/fast-import/git-p4

4
contrib/fast-import/git-p4

@ -1185,9 +1185,7 @@ if cmd.needsGit: @@ -1185,9 +1185,7 @@ if cmd.needsGit:
if len(gitdir) == 0:
gitdir = ".git"
if not isValidGitDir(gitdir):
cdup = mypopen("git rev-parse --show-cdup").read()[:-1]
if isValidGitDir(cdup + "/" + gitdir):
os.chdir(cdup)
gitdir = mypopen("git rev-parse --git-dir").read()[:-1]

if not isValidGitDir(gitdir):
if isValidGitDir(gitdir + "/.git"):

Loading…
Cancel
Save