unpack-trees.hon commit Merge branch 'jc/conflict-marker-size' (06dbc1e)
   1#ifndef UNPACK_TREES_H
   2#define UNPACK_TREES_H
   3
   4#define MAX_UNPACK_TREES 8
   5
   6struct unpack_trees_options;
   7struct exclude_list;
   8
   9typedef int (*merge_fn_t)(struct cache_entry **src,
  10                struct unpack_trees_options *options);
  11
  12struct unpack_trees_error_msgs {
  13        const char *would_overwrite;
  14        const char *not_uptodate_file;
  15        const char *not_uptodate_dir;
  16        const char *would_lose_untracked;
  17        const char *bind_overlap;
  18        const char *sparse_not_uptodate_file;
  19        const char *would_lose_orphaned;
  20};
  21
  22struct unpack_trees_options {
  23        unsigned int reset,
  24                     merge,
  25                     update,
  26                     index_only,
  27                     nontrivial_merge,
  28                     trivial_merges_only,
  29                     verbose_update,
  30                     aggressive,
  31                     skip_unmerged,
  32                     initial_checkout,
  33                     diff_index_cached,
  34                     skip_sparse_checkout,
  35                     gently;
  36        const char *prefix;
  37        int pos;
  38        struct dir_struct *dir;
  39        merge_fn_t fn;
  40        struct unpack_trees_error_msgs msgs;
  41
  42        int head_idx;
  43        int merge_size;
  44
  45        struct cache_entry *df_conflict_entry;
  46        void *unpack_data;
  47
  48        struct index_state *dst_index;
  49        struct index_state *src_index;
  50        struct index_state result;
  51
  52        struct exclude_list *el; /* for internal use */
  53};
  54
  55extern int unpack_trees(unsigned n, struct tree_desc *t,
  56                struct unpack_trees_options *options);
  57
  58int threeway_merge(struct cache_entry **stages, struct unpack_trees_options *o);
  59int twoway_merge(struct cache_entry **src, struct unpack_trees_options *o);
  60int bind_merge(struct cache_entry **src, struct unpack_trees_options *o);
  61int oneway_merge(struct cache_entry **src, struct unpack_trees_options *o);
  62
  63#endif