summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index 92d6614..88967d6 100644
--- a/revision.h
+++ b/revision.h
@@ -5,6 +5,7 @@
#include "grep.h"
#include "notes.h"
#include "commit.h"
+#include "diff.h"
#define SEEN (1u<<0)
#define UNINTERESTING (1u<<1)
@@ -25,6 +26,7 @@
struct rev_info;
struct log_info;
struct string_list;
+struct saved_parents;
struct rev_cmdline_info {
unsigned int nr;
@@ -59,6 +61,9 @@ struct rev_info {
/* The end-points specified by the end user */
struct rev_cmdline_info cmdline;
+ /* excluding from --branches, --refs, etc. expansion */
+ struct string_list *ref_excludes;
+
/* Basic information */
const char *prefix;
const char *def;
@@ -144,6 +149,7 @@ struct rev_info {
int numbered_files;
int reroll_count;
char *message_id;
+ struct ident_split from_ident;
struct string_list *ref_message_ids;
int add_signoff;
const char *extra_headers;
@@ -186,8 +192,16 @@ struct rev_info {
/* line level range that we are chasing */
struct decoration line_log_data;
+
+ /* copies of the parent lists, for --full-diff display */
+ struct saved_parents *saved_parents_slab;
};
+extern int ref_excluded(struct string_list *, const char *path);
+void clear_ref_exclusion(struct string_list **);
+void add_ref_exclusion(struct string_list **, const char *exclude);
+
+
#define REV_TREE_SAME 0
#define REV_TREE_NEW 1 /* Only new files */
#define REV_TREE_OLD 2 /* Only files removed */
@@ -272,4 +286,20 @@ typedef enum rewrite_result (*rewrite_parent_fn_t)(struct rev_info *revs, struct
extern int rewrite_parents(struct rev_info *revs, struct commit *commit,
rewrite_parent_fn_t rewrite_parent);
+
+/*
+ * Save a copy of the parent list, and return the saved copy. This is
+ * used by the log machinery to retrieve the original parents when
+ * commit->parents has been modified by history simpification.
+ *
+ * You may only call save_parents() once per commit (this is checked
+ * for non-root commits).
+ *
+ * get_saved_parents() will transparently return commit->parents if
+ * history simplification is off.
+ */
+extern void save_parents(struct rev_info *revs, struct commit *commit);
+extern struct commit_list *get_saved_parents(struct rev_info *revs, const struct commit *commit);
+extern void free_saved_parents(struct rev_info *revs);
+
#endif