From: Simon Hausmann Date: Tue, 15 May 2007 21:06:43 +0000 (+0200) Subject: Make git-p4 work with bare repositories. X-Git-Tag: v1.5.3-rc0~65^2^2~114 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=81f2373f89895a47ed0251ac0856798514cfb618;p=git.git Make git-p4 work with bare repositories. Signed-off-by: Simon Hausmann --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 2633f2994..84cdca1aa 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -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"):