Commit fed3fef4 by Peter Pettersson Committed by Peter Pettersson

merge: allocate merge flags for internal use

Allocate flags in git_merge_flag_t and git_merge_file_flag_t
for internal usage to prevent accidental double allocation.
parent caaa1fdf
...@@ -91,7 +91,10 @@ typedef enum { ...@@ -91,7 +91,10 @@ typedef enum {
* instead simply use the first base. This flag provides a similar * instead simply use the first base. This flag provides a similar
* merge base to `git-merge-resolve`. * merge base to `git-merge-resolve`.
*/ */
GIT_MERGE_NO_RECURSIVE = (1 << 3) GIT_MERGE_NO_RECURSIVE = (1 << 3),
/* This flag is reserved for internal library use */
GIT_MERGE__INTERNAL_FLAG = (1 << 30)
} git_merge_flag_t; } git_merge_flag_t;
/** /**
...@@ -162,7 +165,10 @@ typedef enum { ...@@ -162,7 +165,10 @@ typedef enum {
GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7), GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7),
/** Create zdiff3 ("zealous diff3")-style files */ /** Create zdiff3 ("zealous diff3")-style files */
GIT_MERGE_FILE_STYLE_ZDIFF3 = (1 << 8) GIT_MERGE_FILE_STYLE_ZDIFF3 = (1 << 8),
/* This flag is reserved for internal library use */
GIT_MERGE_FILE__INTERNAL_FLAG = (1 << 30)
} git_merge_file_flag_t; } git_merge_file_flag_t;
#define GIT_MERGE_CONFLICT_MARKER_SIZE 7 #define GIT_MERGE_CONFLICT_MARKER_SIZE 7
......
...@@ -27,15 +27,12 @@ ...@@ -27,15 +27,12 @@
/** Internal merge flags. */ /** Internal merge flags. */
enum {
/** The merge is for a virtual base in a recursive merge. */ /** The merge is for a virtual base in a recursive merge. */
GIT_MERGE__VIRTUAL_BASE = (1 << 31) #define GIT_MERGE__VIRTUAL_BASE (GIT_MERGE__INTERNAL_FLAG)
};
/** Accept the conflict file, staging it as the merge result. */
enum { #define GIT_MERGE_FILE__CONFLICTED (GIT_MERGE_FILE__INTERNAL_FLAG)
/** Accept the conflict file, staging it as the merge result. */
GIT_MERGE_FILE__CONFLICTED = (1 << 30)
};
/** Types of changes when files are merged from branch to branch. */ /** Types of changes when files are merged from branch to branch. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment