summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-05-17 07:42:38 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-05-17 07:42:38 +0200
commit5c4153e4880a90c05612521e9ee575a308d207db (patch)
tree6828905948abac40e9c339f856416237d637a641 /contrib/fast-import
parentA little todo note before I forget it :), based on a suggestion from Lars. (diff)
downloadtgif-5c4153e4880a90c05612521e9ee575a308d207db.tar.xz
Fixing syncing (gitdir discovery / cd) for bare repositories
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p44
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 70366ff8c0..239304857d 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1200,7 +1200,9 @@ if cmd.needsGit:
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]);
+ cdup = mypopen("git rev-parse --show-cdup").read()[:-1];
+ if len(cdup) > 0:
+ os.chdir(cdup);
if not isValidGitDir(gitdir):
if isValidGitDir(gitdir + "/.git"):