summaryrefslogtreecommitdiff
path: root/parse-options.h
diff options
context:
space:
mode:
authorStephen Boyd <bebarino@gmail.com>2010-12-05 23:57:42 -0800
committerJunio C Hamano <gitster@pobox.com>2010-12-06 16:51:36 -0800
commit9ca1169fd92c71ebbef92ff18aa5d91a2157d1bd (patch)
treea1490182bae47da917a1d64a3ce1a52dbece0425 /parse-options.h
parent16529f2e5630d3d155e4dff0ebd3c7c5daa882f9 (diff)
downloadgit-9ca1169fd92c71ebbef92ff18aa5d91a2157d1bd.tar.gz
parse-options: Don't call parse_options_check() so much
parse_options_check() is being called for each invocation of parse_options_step which can be quite a bit for some commands. The commit introducing this function cb9d398 (parse-options: add parse_options_check to validate option specs., 2009-06-09) had the correct motivation and explicitly states that parse_options_check() should be called from parse_options_start(). However, the implementation differs from the motivation. Fix it. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.h')
-rw-r--r--parse-options.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse-options.h b/parse-options.h
index d982f0f1bf..5eb499b992 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -180,7 +180,7 @@ struct parse_opt_ctx_t {
extern void parse_options_start(struct parse_opt_ctx_t *ctx,
int argc, const char **argv, const char *prefix,
- int flags);
+ const struct option *options, int flags);
extern int parse_options_step(struct parse_opt_ctx_t *ctx,
const struct option *options,