OSDN Git Service

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 2633f29..84cdca1 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"):