Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Make it possible to invoke git-p4 from within subdirectories of a git working tree.
author
Simon Hausmann
<hausmann@kde.org>
Wed, 21 Mar 2007 12:05:30 +0000
(13:05 +0100)
committer
Simon Hausmann
<hausmann@kde.org>
Wed, 21 Mar 2007 12:05:30 +0000
(13:05 +0100)
Signed-off-by: Simon Hausmann <hausmann@kde.org>
contrib/fast-import/git-p4.py
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
1932a6a
)
diff --git
a/contrib/fast-import/git-p4.py
b/contrib/fast-import/git-p4.py
index a07534058c5af91ac879b16d5021f1150eeb5391..f940e93bad1db606f128acd601b5d271f8e0a1ed 100755
(executable)
--- a/
contrib/fast-import/git-p4.py
+++ b/
contrib/fast-import/git-p4.py
@@
-925,6
+925,10
@@
def printUsage(commands):
gitdir = cmd.gitdir
if len(gitdir) == 0:
gitdir = ".git"
+ if not isValidGitDir(gitdir):
+ cdup = os.popen("git-rev-parse --show-cdup").read()[:-1]
+ if isValidGitDir(cdup + "/" + gitdir):
+ os.chdir(cdup)
if not isValidGitDir(gitdir):
if isValidGitDir(gitdir + "/.git"):