Fix calling git-p4 rebase from within a subdirectory (git rebase wants to be in toplevel)
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Simon Hausmann committed
May 16, 2007 at 12:12 UTC
dc1a93b6dce1d38e6e0ddd8980d8ccd64937fcb1
1 file changed
+2
contrib/fast-import/git-p4
+2
@@ -1197,6 +1197,8 @@ if cmd.needsGit:
1197
gitdir = ".git"
1198
if not isValidGitDir(gitdir):
1199
gitdir = mypopen("git rev-parse --git-dir").read()[:-1]
1200
+ if os.path.exists(gitdir):
1201
+ os.chdir(mypopen("git rev-parse --show-cdup").read()[:-1]);
1202
1203
if not isValidGitDir(gitdir):
1204
if isValidGitDir(gitdir + "/.git"):