summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-03-26 00:13:51 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-03-26 00:13:51 +0200
commite20a9e530a02fefaec31b484bd224784b8814554 (patch)
treeda9a99a1f85eb97a2aa0a4dedaf3d09d9bf7a8b1 /contrib/fast-import
parentPrefer git command over git-command. (diff)
downloadtgif-e20a9e530a02fefaec31b484bd224784b8814554.tar.xz
Don't try to parse any options with git-p4 debug but pass it straight on to p4
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p416
1 files changed, 10 insertions, 6 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 09990be373..5b023b1b7a 100755
--- 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.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: