@@ -799,6 +799,8 @@ static void path_msg(struct merge_options *opt,
799799 return ; /* Do not record mere hints in headers */
800800 if (opt -> priv -> call_depth && opt -> verbosity < 5 )
801801 return ; /* Ignore messages from inner merges */
802+ if (!opt -> verbosity )
803+ return ;
802804
803805 /* Ensure path_conflicts (ptr to array of logical_conflict) allocated */
804806 path_conflicts = strmap_get (& opt -> priv -> conflicts , primary_path );
@@ -3449,6 +3451,11 @@ static int detect_and_process_renames(struct merge_options *opt)
34493451
34503452 if (!possible_renames (renames ))
34513453 goto cleanup ;
3454+ if (opt -> detect_renames == 0 ) {
3455+ renames -> redo_after_renames = 0 ;
3456+ renames -> cached_pairs_valid_side = 0 ;
3457+ goto cleanup ;
3458+ }
34523459
34533460 trace2_region_enter ("merge" , "regular renames" , opt -> repo );
34543461 detection_run |= detect_regular_renames (opt , MERGE_SIDE1 );
@@ -4879,9 +4886,9 @@ static inline void set_commit_tree(struct commit *c, struct tree *t)
48794886 c -> maybe_tree = t ;
48804887}
48814888
4882- static struct commit * make_virtual_commit (struct repository * repo ,
4883- struct tree * tree ,
4884- const char * comment )
4889+ struct commit * make_virtual_commit (struct repository * repo ,
4890+ struct tree * tree ,
4891+ const char * comment )
48854892{
48864893 struct commit * commit = alloc_commit_node (repo );
48874894
@@ -5187,6 +5194,8 @@ static void merge_ort_internal(struct merge_options *opt,
51875194 ancestor_name = "empty tree" ;
51885195 } else if (merge_bases ) {
51895196 ancestor_name = "merged common ancestors" ;
5197+ } else if (opt -> ancestor ) {
5198+ ancestor_name = opt -> ancestor ;
51905199 } else {
51915200 strbuf_add_unique_abbrev (& merge_base_abbrev ,
51925201 & merged_merge_bases -> object .oid ,
@@ -5276,8 +5285,13 @@ void merge_incore_recursive(struct merge_options *opt,
52765285{
52775286 trace2_region_enter ("merge" , "incore_recursive" , opt -> repo );
52785287
5279- /* We set the ancestor label based on the merge_bases */
5280- assert (opt -> ancestor == NULL );
5288+ /*
5289+ * We set the ancestor label based on the merge_bases...but we
5290+ * allow one exception through so that builtin/am can override
5291+ * with its constructed fake ancestor.
5292+ */
5293+ assert (opt -> ancestor == NULL ||
5294+ (merge_bases && !merge_bases -> next ));
52815295
52825296 trace2_region_enter ("merge" , "merge_start" , opt -> repo );
52835297 merge_start (opt , result );
0 commit comments