Merge branch 'js/merge-already-up-to-date-message-reword'

A few variants of informational message "Already up-to-date" has
been rephrased.

* js/merge-already-up-to-date-message-reword:
  merge: fix swapped "up to date" message components
  merge(s): apply consistent punctuation to "up to date" messages
This commit is contained in:
Junio C Hamano 2021-05-11 15:27:22 +09:00
commit 5feebddd86
4 changed files with 12 additions and 8 deletions

View File

@ -393,10 +393,14 @@ static void restore_state(const struct object_id *head,
}
/* This is called when no merge was necessary. */
static void finish_up_to_date(const char *msg)
static void finish_up_to_date(void)
{
if (verbosity >= 0)
printf("%s%s\n", squash ? _(" (nothing to squash)") : "", msg);
if (verbosity >= 0) {
if (squash)
puts(_("Already up to date. (nothing to squash)"));
else
puts(_("Already up to date."));
}
remove_merge_branch_state(the_repository);
}
@ -1522,7 +1526,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
* If head can reach all the merge then we are up to date.
* but first the most common case of merging one remote.
*/
finish_up_to_date(_("Already up to date."));
finish_up_to_date();
goto done;
} else if (fast_forward != FF_NO && !remoteheads->next &&
!common->next &&
@ -1610,7 +1614,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
}
}
if (up_to_date) {
finish_up_to_date(_("Already up to date. Yeeah!"));
finish_up_to_date();
goto done;
}
}

View File

@ -30,7 +30,7 @@ int merge_ort_nonrecursive(struct merge_options *opt,
return -1;
if (oideq(&merge_base->object.oid, &merge->object.oid)) {
printf(_("Already up to date!"));
printf_ln(_("Already up to date."));
return 1;
}

View File

@ -3462,7 +3462,7 @@ static int merge_trees_internal(struct merge_options *opt,
}
if (oideq(&merge_base->object.oid, &merge->object.oid)) {
output(opt, 0, _("Already up to date!"));
output(opt, 0, _("Already up to date."));
*result = head;
return 1;
}

View File

@ -628,7 +628,7 @@ int notes_merge(struct notes_merge_options *o,
if (oideq(&remote->object.oid, base_oid)) {
/* Already merged; result == local commit */
if (o->verbosity >= 2)
printf("Already up to date!\n");
printf_ln("Already up to date.");
oidcpy(result_oid, &local->object.oid);
goto found_result;
}