Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-07 06:47:38 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-07 06:47:38 +0300
commit6d99f31ddafb064795d1d8f9b9bd930296f7069e (patch)
treeadf4f61cbee195077c2810dd7fd7d0b98d07c284 /apply.c
parent6e08cbdf3857ea2b335c96f515743090ed58c709 (diff)
parent526705fd3d14a38646a12235ee385dcc0ffc7321 (diff)
Merge branch 'jz/apply-3way-first-message-fix'
When we swapped the order of --3way fallback, we forgot to adjust the message we give when the first method fails and the second method is attempted (which used to be "direct application failed hence we try 3way", now it is the other way around). * jz/apply-3way-first-message-fix: apply: adjust messages to account for --3way changes
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index 8c5b29809b..853d3ed385 100644
--- a/apply.c
+++ b/apply.c
@@ -3570,7 +3570,7 @@ static int try_threeway(struct apply_state *state,
read_blob_object(&buf, &pre_oid, patch->old_mode))
return error(_("repository lacks the necessary blob to perform 3-way merge."));
- if (state->apply_verbosity > verbosity_silent)
+ if (state->apply_verbosity > verbosity_silent && patch->direct_to_threeway)
fprintf(stderr, _("Performing three-way merge...\n"));
img = strbuf_detach(&buf, &len);
@@ -3637,6 +3637,10 @@ static int apply_data(struct apply_state *state, struct patch *patch,
return -1;
if (!state->threeway || try_threeway(state, &image, patch, st, ce) < 0) {
+ if (state->apply_verbosity > verbosity_silent &&
+ state->threeway && !patch->direct_to_threeway)
+ fprintf(stderr, _("Falling back to direct application...\n"));
+
/* Note: with --reject, apply_fragments() returns 0 */
if (patch->direct_to_threeway || apply_fragments(state, &image, patch) < 0)
return -1;