summary refs log tree commit diff
path: root/merge-recursive.h
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-08-17 11:41:41 -0700
committerJunio C Hamano <gitster@pobox.com>2019-08-19 10:08:04 -0700
commit5bf7e5779ec6d5293b3135554d49e6fcee88d399 (patch)
tree3e55a11dc2ee8d9c3423038af1deab6bcdd58795 /merge-recursive.h
parente95e481f9e6e4dfe62380ccc8a47acf446403a94 (diff)
merge-recursive: split internal fields into a separate struct
merge_options has several internal fields that should not be set or read
by external callers.  This just complicates the API.  Move them into an
opaque merge_options_internal struct that is defined only in
merge-recursive.c and keep these out of merge-recursive.h.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-recursive.h')
-rw-r--r--merge-recursive.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/merge-recursive.h b/merge-recursive.h
index 933d6e7642..58a4c5238a 100644
--- a/merge-recursive.h
+++ b/merge-recursive.h
@@ -1,13 +1,15 @@
 #ifndef MERGE_RECURSIVE_H
 #define MERGE_RECURSIVE_H
 
-#include "string-list.h"
-#include "unpack-trees.h"
+#include "strbuf.h"
 
 struct commit;
-
+struct commit_list;
+struct object_id;
 struct repository;
+struct tree;
 
+struct merge_options_internal;
 struct merge_options {
 	struct repository *repo;
 
@@ -45,13 +47,8 @@ struct merge_options {
 	const char *subtree_shift;
 	unsigned renormalize : 1;
 
-	/* internal fields used by the implementation (do NOT set these) */
-	int call_depth;
-	int needed_rename_limit;
-	struct hashmap current_file_dir_set;
-	struct string_list df_conflict_file_set;
-	struct unpack_trees_options unpack_opts;
-	struct index_state orig_index;
+	/* internal fields used by the implementation */
+	struct merge_options_internal *priv;
 };
 
 void init_merge_options(struct merge_options *opt, struct repository *repo);