@@ -4198,7 +4198,8 @@ static int record_conflicted_index_entries(struct merge_options *opt)
}
void merge_display_update_messages(struct merge_options *opt,
- struct merge_result *result)
+ struct merge_result *result,
+ FILE *stream)
{
struct merge_options_internal *opti = result->priv;
struct hashmap_iter iter;
@@ -4222,7 +4223,7 @@ void merge_display_update_messages(struct merge_options *opt,
for (i = 0; i < olist.nr; ++i) {
struct strbuf *sb = olist.items[i].util;
- printf("%s", sb->buf);
+ fprintf(stream, "%s", sb->buf);
}
string_list_clear(&olist, 0);
@@ -4272,7 +4273,7 @@ void merge_switch_to_result(struct merge_options *opt,
}
if (display_update_msgs)
- merge_display_update_messages(opt, result);
+ merge_display_update_messages(opt, result, stdout);
merge_finalize(opt, result);
}
@@ -76,7 +76,8 @@ void merge_switch_to_result(struct merge_options *opt,
* so only call this when bypassing merge_switch_to_result().
*/
void merge_display_update_messages(struct merge_options *opt,
- struct merge_result *result);
+ struct merge_result *result,
+ FILE *stream);
/* Do needed cleanup when not calling merge_switch_to_result() */
void merge_finalize(struct merge_options *opt,