summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/revision.h b/revision.h
index 007278c..bc30a30 100644
--- a/revision.h
+++ b/revision.h
@@ -28,8 +28,9 @@
#define DECORATE_SHORT_REFS 1
#define DECORATE_FULL_REFS 2
-struct rev_info;
struct log_info;
+struct repository;
+struct rev_info;
struct string_list;
struct saved_parents;
define_shared_commit_slab(revision_sources, char *);
@@ -60,6 +61,7 @@ struct rev_info {
/* Starting list */
struct commit_list *commits;
struct object_array pending;
+ struct repository *repo;
/* Parents of shown commits */
struct object_array boundary_commits;
@@ -82,6 +84,11 @@ struct rev_info {
*/
int rev_input_given;
+ /*
+ * Whether we read from stdin due to the --stdin option.
+ */
+ int read_from_stdin;
+
/* topo-sort */
enum rev_sort_order sort_order;
@@ -214,6 +221,17 @@ struct rev_info {
/* notes-specific options: which refs to show */
struct display_notes_opt notes_opt;
+ /* interdiff */
+ const struct object_id *idiff_oid1;
+ const struct object_id *idiff_oid2;
+ const char *idiff_title;
+
+ /* range-diff */
+ const char *rdiff1;
+ const char *rdiff2;
+ int creation_factor;
+ const char *rdiff_title;
+
/* commit counts */
int count_left;
int count_right;
@@ -248,12 +266,17 @@ extern volatile show_early_output_fn_t show_early_output;
struct setup_revision_opt {
const char *def;
void (*tweak)(struct rev_info *, struct setup_revision_opt *);
- const char *submodule;
+ const char *submodule; /* TODO: drop this and use rev_info->repo */
int assume_dashdash;
unsigned revarg_opt;
};
-void init_revisions(struct rev_info *revs, const char *prefix);
+#ifndef NO_THE_REPOSITORY_COMPATIBILITY_MACROS
+#define init_revisions(revs, prefix) repo_init_revisions(the_repository, revs, prefix)
+#endif
+void repo_init_revisions(struct repository *r,
+ struct rev_info *revs,
+ const char *prefix);
int setup_revisions(int argc, const char **argv, struct rev_info *revs,
struct setup_revision_opt *);
void parse_revision_opt(struct rev_info *revs, struct parse_opt_ctx_t *ctx,
@@ -273,7 +296,7 @@ void put_revision_mark(const struct rev_info *revs,
const struct commit *commit);
void mark_parents_uninteresting(struct commit *commit);
-void mark_tree_uninteresting(struct tree *tree);
+void mark_tree_uninteresting(struct repository *r, struct tree *tree);
void show_object_with_name(FILE *, struct object *, const char *);