X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=ll-merge.h;h=ff7ca87bfa01d0e9705f4bfd83b9e4d2c155d588;hb=1f238da57334ca0155ae7560b173eefc8c4c157a;hp=57889227b1782d3792be2046fbb54bca67b779de;hpb=f3604763ba0355f628cf815cfaf4fec20d46e958;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);