summaryrefslogtreecommitdiff
path: root/contrib/fast-import/git-p4
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/fast-import/git-p4')
-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"):