merge-recursive.hon commit Make "subtree" part more orthogonal to the rest of merge-recursive. (85e51b7)
   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_NORMAL = 0,
  11                MERGE_RECURSIVE_OURS,
  12                MERGE_RECURSIVE_THEIRS,
  13        } recursive_variant;
  14        const char *subtree_shift;
  15        unsigned buffer_output : 1;
  16        int verbosity;
  17        int diff_rename_limit;
  18        int merge_rename_limit;
  19        int call_depth;
  20        struct strbuf obuf;
  21        struct string_list current_file_set;
  22        struct string_list current_directory_set;
  23};
  24
  25/* merge_trees() but with recursive ancestor consolidation */
  26int merge_recursive(struct merge_options *o,
  27                    struct commit *h1,
  28                    struct commit *h2,
  29                    struct commit_list *ancestors,
  30                    struct commit **result);
  31
  32/* rename-detecting three-way merge, no recursion */
  33int merge_trees(struct merge_options *o,
  34                struct tree *head,
  35                struct tree *merge,
  36                struct tree *common,
  37                struct tree **result);
  38
  39/*
  40 * "git-merge-recursive" can be fed trees; wrap them into
  41 * virtual commits and call merge_recursive() proper.
  42 */
  43int merge_recursive_generic(struct merge_options *o,
  44                            const unsigned char *head,
  45                            const unsigned char *merge,
  46                            int num_ca,
  47                            const unsigned char **ca,
  48                            struct commit **result);
  49
  50void init_merge_options(struct merge_options *o);
  51struct tree *write_tree_from_memory(struct merge_options *o);
  52
  53#endif