Cross Forests
/
projects
/
python
/
fast-export.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
10255c3
)
Allow invocations from within 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)
git-p4.py
patch
|
blob
|
history
diff --git
a/git-p4.py
b/git-p4.py
index
a075340
..
f940e93
100755
(executable)
--- a/
git-p4.py
+++ b/
git-p4.py
@@
-925,6
+925,10
@@
parser = optparse.OptionParser(cmd.usage.replace("%prog", "%prog " + cmdName),
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"):