X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=ll-merge.h;h=244a31f55ac7375b59d7c257bfc2391957fdca94;hb=9721d2fb10cd81d162248322facdc050433da50f;hp=ff7ca87bfa01d0e9705f4bfd83b9e4d2c155d588;hpb=eb4e67288bb9d66fb46092fa30d72c4bdded0c2a;p=git.git diff --git a/ll-merge.h b/ll-merge.h index ff7ca87bf..244a31f55 100644 --- a/ll-merge.h +++ b/ll-merge.h @@ -5,27 +5,19 @@ #ifndef LL_MERGE_H #define LL_MERGE_H -#define LL_OPT_VIRTUAL_ANCESTOR (1 << 0) -#define LL_OPT_FAVOR_MASK ((1 << 1) | (1 << 2)) -#define LL_OPT_FAVOR_SHIFT 1 -#define LL_OPT_RENORMALIZE (1 << 3) - -static inline int ll_opt_favor(int flag) -{ - return (flag & LL_OPT_FAVOR_MASK) >> LL_OPT_FAVOR_SHIFT; -} - -static inline int create_ll_flag(int favor) -{ - return ((favor << LL_OPT_FAVOR_SHIFT) & LL_OPT_FAVOR_MASK); -} +struct ll_merge_options { + unsigned virtual_ancestor : 1; + unsigned variant : 2; /* favor ours, favor theirs, or union merge */ + unsigned renormalize : 1; + long xdl_opts; +}; int ll_merge(mmbuffer_t *result_buf, const char *path, mmfile_t *ancestor, const char *ancestor_label, mmfile_t *ours, const char *our_label, mmfile_t *theirs, const char *their_label, - int flag); + const struct ll_merge_options *opts); int ll_merge_marker_size(const char *path);