aboutsummaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-08 22:58:09 -0800
committerJunio C Hamano <gitster@pobox.com>2010-03-09 01:11:18 -0800
commit32962c9bd5149005b163dff230670872eb99286a (patch)
tree8bc0322fbc0d51a26a7fb9b6bd2d08f39bdacc30 /revision.h
parent126f431ab61b250deab2b46f933a5bcd35a71c6b (diff)
downloadgit-32962c9bd5149005b163dff230670872eb99286a.tar.gz
git-32962c9bd5149005b163dff230670872eb99286a.tar.xz
revision: introduce setup_revision_opt
So far the last parameter to setup_revisions() was to specify the default ref when the command line did not give any (typically "HEAD"). This changes it to take a pointer to a structure so that we can add other information without touching too many codepaths in later patches. There is no functionality change. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/revision.h b/revision.h
index a14deefc2..fcc0de8ee 100644
--- a/revision.h
+++ b/revision.h
@@ -137,8 +137,12 @@ struct rev_info {
typedef void (*show_early_output_fn_t)(struct rev_info *, struct commit_list *);
extern volatile show_early_output_fn_t show_early_output;
+struct setup_revision_opt {
+ const char *def;
+};
+
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 setup_revisions(int argc, const char **argv, struct rev_info *revs, struct setup_revision_opt *);
extern void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
const struct option *options,
const char * const usagestr[]);