Git fork

merge-ort-wrappers: make printed message match the one from recursive

When the index does not match HEAD, the merge strategies are responsible
to detect that condition and abort. The merge-ort-wrappers had code to
implement this and meant to copy the error message from merge-recursive
but deviated in two ways, both due to the message in merge-recursive
being processed by another function that made additional changes:
* It added an implicit "error: " prefix
* It added an implicit trailing newline
We can get these things by making use of the error() function.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Elijah Newren and committed by
Junio C Hamano
11f42900 e72d93e8

+2 -2
+2 -2
merge-ort-wrappers.c
··· 10 10 struct strbuf sb = STRBUF_INIT; 11 11 12 12 if (head && repo_index_has_changes(opt->repo, head, &sb)) { 13 - fprintf(stderr, _("Your local changes to the following files would be overwritten by merge:\n %s"), 14 - sb.buf); 13 + error(_("Your local changes to the following files would be overwritten by merge:\n %s"), 14 + sb.buf); 15 15 strbuf_release(&sb); 16 16 return -1; 17 17 }