X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=ll-merge.h;h=ff7ca87bfa01d0e9705f4bfd83b9e4d2c155d588;hb=9bdef78fb05ce2ca7788518e17ae20488b153335;hp=57889227b1782d3792be2046fbb54bca67b779de;hpb=d7173d942ea897b67ac9ba3bab2a0cc374684ca6;p=git.git diff --git a/ll-merge.h b/ll-merge.h index 57889227b..ff7ca87bf 100644 --- a/ll-merge.h +++ b/ll-merge.h @@ -5,9 +5,24 @@ #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); +} + int ll_merge(mmbuffer_t *result_buf, const char *path, - mmfile_t *ancestor, + mmfile_t *ancestor, const char *ancestor_label, mmfile_t *ours, const char *our_label, mmfile_t *theirs, const char *their_label, int flag);