Commit caaa1fdf8b7233736e9d6f5ae040eb4d8071e5b8

Peter Pettersson 2022-02-07T00:58:38

merge: change enum GIT_MERGE_FILE_FAVOR__CONFLICTED to flag GIT_MERGE_FILE__CONFLICTED This is to avoid a possible problem where the value is set to the same as GIT_MERGE_FILE_SIMPLIFY_ALNUM in git_merge_file_flag_t

diff --git a/src/merge.c b/src/merge.c
index 24650bb..5f3a37b 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -2120,7 +2120,7 @@ int git_merge__iterators(
 		file_opts.ancestor_label = "merged common ancestors";
 		file_opts.our_label = "Temporary merge branch 1";
 		file_opts.their_label = "Temporary merge branch 2";
-		file_opts.flags |= GIT_MERGE_FILE_FAVOR__CONFLICTED;
+		file_opts.flags |= GIT_MERGE_FILE__CONFLICTED;
 		file_opts.marker_size = GIT_MERGE_CONFLICT_MARKER_SIZE + 2;
 	}
 
diff --git a/src/merge.h b/src/merge.h
index 632f2d8..1b541bf 100644
--- a/src/merge.h
+++ b/src/merge.h
@@ -34,7 +34,7 @@ enum {
 
 enum {
 	/** Accept the conflict file, staging it as the merge result. */
-	GIT_MERGE_FILE_FAVOR__CONFLICTED = 4
+	GIT_MERGE_FILE__CONFLICTED = (1 << 30)
 };
 
 
diff --git a/src/merge_driver.c b/src/merge_driver.c
index be4d3bf..66b257a 100644
--- a/src/merge_driver.c
+++ b/src/merge_driver.c
@@ -93,7 +93,7 @@ int git_merge_driver__builtin_apply(
 		goto done;
 
 	if (!result.automergeable &&
-		!(file_opts.flags & GIT_MERGE_FILE_FAVOR__CONFLICTED)) {
+		!(file_opts.flags & GIT_MERGE_FILE__CONFLICTED)) {
 		error = GIT_EMERGECONFLICT;
 		goto done;
 	}