Code

Make git-p4 work with bare repositories.
authorSimon Hausmann <simon@lst.de>
Tue, 15 May 2007 21:06:43 +0000 (23:06 +0200)
committerSimon Hausmann <simon@lst.de>
Tue, 15 May 2007 21:06:43 +0000 (23:06 +0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4

index 2633f299424056308f57fd93505803bb008fe8cd..84cdca1aa268902d7837fa4a7247287f91a878c2 100755 (executable)
@@ -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"):