Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Don't try to parse any options with git-p4 debug but pass it straight on to p4
author
Simon Hausmann
<simon@lst.de>
Sun, 25 Mar 2007 22:13:51 +0000
(
00:13
+0200)
committer
Simon Hausmann
<simon@lst.de>
Sun, 25 Mar 2007 22:13:51 +0000
(
00:13
+0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
9863f40
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index 09990be3734bd05931ecb388b5af1c9baf264dfb..5b023b1b7a092cd322a2f40d09c590f1ccf0921e 100755
(executable)
--- a/
contrib/fast-import/git-p4
+++ b/
contrib/fast-import/git-p4
@@
-1018,14
+1018,18
@@
except KeyError:
options = cmd.options
cmd.gitdir = gitdir
options = cmd.options
cmd.gitdir = gitdir
-options.append(optparse.make_option("--git-dir", dest="gitdir"))
-parser = optparse.OptionParser(cmd.usage.replace("%prog", "%prog " + cmdName),
- options,
- description = cmd.description,
- formatter = HelpFormatter())
+args = sys.argv[2:]
-(cmd, args) = parser.parse_args(sys.argv[2:], cmd);
+if len(options) > 0:
+ options.append(optparse.make_option("--git-dir", dest="gitdir"))
+
+ parser = optparse.OptionParser(cmd.usage.replace("%prog", "%prog " + cmdName),
+ options,
+ description = cmd.description,
+ formatter = HelpFormatter())
+
+ (cmd, args) = parser.parse_args(sys.argv[2:], cmd);
gitdir = cmd.gitdir
if len(gitdir) == 0:
gitdir = cmd.gitdir
if len(gitdir) == 0: