diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-12 08:46:55 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-12 08:46:55 -0500 |
| commit | 0fbf62cd2027e4ad6aed1d207099c17d2414073c (patch) | |
| tree | 193e3fbc533d4bf746c063fc27ab534ff688c991 /include/git2/merge.h | |
| parent | fed3fef451a45c0b654f996760f403b454f23616 (diff) | |
| download | libgit2-0fbf62cd2027e4ad6aed1d207099c17d2414073c.tar.gz | |
merge: make the internal flags public
We made the flags that enable recursive merge internal, on the
assumption that nobody would want them and they're hard to reason about.
(Giving people an option that nobody wants is just extra noise.)
However, it made it hard for _us_ to reason about. There's no good
reason to keep it private, let's just make it public and push that
cognitive load onto our poor users. But they should expect it, they're
dealing with git, after all.
Diffstat (limited to 'include/git2/merge.h')
| -rw-r--r-- | include/git2/merge.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/git2/merge.h b/include/git2/merge.h index a30833915..e90941a49 100644 --- a/include/git2/merge.h +++ b/include/git2/merge.h @@ -93,8 +93,13 @@ typedef enum { */ GIT_MERGE_NO_RECURSIVE = (1 << 3), - /* This flag is reserved for internal library use */ - GIT_MERGE__INTERNAL_FLAG = (1 << 30) + /** + * Treat this merge as if it is to produce the virtual base + * of a recursive merge. This will ensure that there are + * no conflicts, any conflicting regions will keep conflict + * markers in the merge result. + */ + GIT_MERGE_VIRTUAL_BASE = (1 << 4) } git_merge_flag_t; /** @@ -167,8 +172,12 @@ typedef enum { /** Create zdiff3 ("zealous diff3")-style files */ GIT_MERGE_FILE_STYLE_ZDIFF3 = (1 << 8), - /* This flag is reserved for internal library use */ - GIT_MERGE_FILE__INTERNAL_FLAG = (1 << 30) + /** + * Do not produce file conflicts when common regions have + * changed; keep the conflict markers in the file and accept + * that as the merge result. + */ + GIT_MERGE_FILE_ACCEPT_CONFLICTS = (1 << 9) } git_merge_file_flag_t; #define GIT_MERGE_CONFLICT_MARKER_SIZE 7 |
