summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-05-15 23:06:43 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-05-15 23:06:43 +0200
commit81f2373f89895a47ed0251ac0856798514cfb618 (patch)
treeb87b18e0799803d34430cbba87cddaf20bc504e9
parentFix git-p4 clone //depot/project (head import) (diff)
downloadtgif-81f2373f89895a47ed0251ac0856798514cfb618.tar.xz
Make git-p4 work with bare repositories.
Signed-off-by: Simon Hausmann <simon@lst.de>
-rwxr-xr-xcontrib/fast-import/git-p44
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 2633f29942..84cdca1aa2 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"):