@matheusbsbs / matheus-bagliano / commits / 5c4153e488
Fork 0

Fixing syncing (gitdir discovery / cd) for bare repositories

Signed-off-by: Simon Hausmann <simon@lst.de>

Simon Hausmann committed May 17, 2007 at 07:42 UTC 5c4153e4880a90c05612521e9ee575a308d207db
1 file changed +3 -1
contrib/fast-import/git-p4
+3 -1
@@ -1200,7 +1200,9 @@ if cmd.needsGit:
1200 if not isValidGitDir(gitdir):
1201 gitdir = mypopen("git rev-parse --git-dir").read()[:-1]
1202 if os.path.exists(gitdir):
1203 - os.chdir(mypopen("git rev-parse --show-cdup").read()[:-1]);
1203 + cdup = mypopen("git rev-parse --show-cdup").read()[:-1];
1204 + if len(cdup) > 0:
1205 + os.chdir(cdup);
1206
1207 if not isValidGitDir(gitdir):
1208 if isValidGitDir(gitdir + "/.git"):