merge-recursive.hon commit git merge -X<option> (8cc5b29)
   1#ifndef MERGE_RECURSIVE_H
   2#define MERGE_RECURSIVE_H
   3
   4#include "string-list.h"
   5
   6struct merge_options {
   7        const char *branch1;
   8        const char *branch2;
   9        enum {
  10                MERGE_RECURSIVE_SUBTREE = 1,
  11                MERGE_RECURSIVE_OURS,
  12                MERGE_RECURSIVE_THEIRS,
  13        } recursive_variant;
  14        unsigned buffer_output : 1;
  15        int verbosity;
  16        int diff_rename_limit;
  17        int merge_rename_limit;
  18        int call_depth;
  19        struct strbuf obuf;
  20        struct string_list current_file_set;
  21        struct string_list current_directory_set;
  22};
  23
  24/* merge_trees() but with recursive ancestor consolidation */
  25int merge_recursive(struct merge_options *o,
  26                    struct commit *h1,
  27                    struct commit *h2,
  28                    struct commit_list *ancestors,
  29                    struct commit **result);
  30
  31/* rename-detecting three-way merge, no recursion */
  32int merge_trees(struct merge_options *o,
  33                struct tree *head,
  34                struct tree *merge,
  35                struct tree *common,
  36                struct tree **result);
  37
  38/*
  39 * "git-merge-recursive" can be fed trees; wrap them into
  40 * virtual commits and call merge_recursive() proper.
  41 */
  42int merge_recursive_generic(struct merge_options *o,
  43                            const unsigned char *head,
  44                            const unsigned char *merge,
  45                            int num_ca,
  46                            const unsigned char **ca,
  47                            struct commit **result);
  48
  49void init_merge_options(struct merge_options *o);
  50struct tree *write_tree_from_memory(struct merge_options *o);
  51
  52#endif