diff options
author | Pierre Habouzit <madcoder@debian.org> | 2008-07-09 23:38:34 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-09 15:14:11 -0700 |
commit | 6b61ec0564993d2e60f7eb56c0f0fd9c313d5e2c (patch) | |
tree | 75d14aa978400c730ae6494055f189c04535df67 /revision.h | |
parent | 14ec9cbdae1991a14aa1cce251e44ea5cfee5ade (diff) | |
download | git-6b61ec0564993d2e60f7eb56c0f0fd9c313d5e2c.tar.gz |
revisions: refactor handle_revision_opt into parse_revision_opt.
It seems we're using handle_revision_opt the same way each time, have a
wrapper around it that does the 9-liner we copy each time instead.
handle_revision_opt can be static in the module for now, it's always
possible to make it public again if needed.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r-- | revision.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/revision.h b/revision.h index c44498e3b3..15dc14925f 100644 --- a/revision.h +++ b/revision.h @@ -1,6 +1,8 @@ #ifndef REVISION_H #define REVISION_H +#include "parse-options.h" + #define SEEN (1u<<0) #define UNINTERESTING (1u<<1) #define TREESAME (1u<<2) @@ -119,8 +121,9 @@ volatile show_early_output_fn_t show_early_output; extern void init_revisions(struct rev_info *revs, const char *prefix); extern int setup_revisions(int argc, const char **argv, struct rev_info *revs, const char *def); -extern int handle_revision_opt(struct rev_info *revs, int argc, const char **argv, - int *unkc, const char **unkv); +extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx, + const struct option *options, + const char * const usagestr[]); extern int handle_revision_arg(const char *arg, struct rev_info *revs,int flags,int cant_be_filename); extern int prepare_revision_walk(struct rev_info *revs); |