diff options
author | Simon Hausmann <simon@lst.de> | 2007-05-15 23:06:43 +0200 |
---|---|---|
committer | Simon Hausmann <simon@lst.de> | 2007-05-15 23:06:43 +0200 |
commit | 81f2373f89895a47ed0251ac0856798514cfb618 (patch) | |
tree | b87b18e0799803d34430cbba87cddaf20bc504e9 | |
parent | Fix git-p4 clone //depot/project (head import) (diff) | |
download | tgif-81f2373f89895a47ed0251ac0856798514cfb618.tar.xz |
Make git-p4 work with bare repositories.
Signed-off-by: Simon Hausmann <simon@lst.de>
-rwxr-xr-x | contrib/fast-import/git-p4 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 2633f29942..84cdca1aa2 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -1185,9 +1185,7 @@ if cmd.needsGit: if len(gitdir) == 0: gitdir = ".git" if not isValidGitDir(gitdir): - cdup = mypopen("git rev-parse --show-cdup").read()[:-1] - if isValidGitDir(cdup + "/" + gitdir): - os.chdir(cdup) + gitdir = mypopen("git rev-parse --git-dir").read()[:-1] if not isValidGitDir(gitdir): if isValidGitDir(gitdir + "/.git"): |