summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <shausman@trolltech.com>2007-05-16 12:12:39 +0200
committerLibravatar Simon Hausmann <shausman@trolltech.com>2007-05-16 12:12:39 +0200
commitdc1a93b6dce1d38e6e0ddd8980d8ccd64937fcb1 (patch)
tree2507a196b5d3c45042477d5f3827c4d64205c8dd /contrib/fast-import
parentGive a better hint if git-p4 submit fails (diff)
downloadtgif-dc1a93b6dce1d38e6e0ddd8980d8ccd64937fcb1.tar.xz
Fix calling git-p4 rebase from within a subdirectory (git rebase wants to be in toplevel)
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Diffstat (limited to 'contrib/fast-import')
-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"):