diff options
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-x | contrib/fast-import/git-p4.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4.py b/contrib/fast-import/git-p4.py index a07534058c..f940e93bad 100755 --- a/contrib/fast-import/git-p4.py +++ b/contrib/fast-import/git-p4.py @@ -925,6 +925,10 @@ parser = optparse.OptionParser(cmd.usage.replace("%prog", "%prog " + cmdName), gitdir = cmd.gitdir if len(gitdir) == 0: gitdir = ".git" + if not isValidGitDir(gitdir): + cdup = os.popen("git-rev-parse --show-cdup").read()[:-1] + if isValidGitDir(cdup + "/" + gitdir): + os.chdir(cdup) if not isValidGitDir(gitdir): if isValidGitDir(gitdir + "/.git"): |