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-p42
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index c48b257577..ca6c623809 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1197,6 +1197,8 @@ if cmd.needsGit:
gitdir = ".git"
if not isValidGitDir(gitdir):
gitdir = mypopen("git rev-parse --git-dir").read()[:-1]
+ if os.path.exists(gitdir):
+ os.chdir(mypopen("git rev-parse --show-cdup").read()[:-1]);
if not isValidGitDir(gitdir):
if isValidGitDir(gitdir + "/.git"):