Skip to content

Commit 5feebdd

Browse files
committed
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
2 parents 8ca4771 + ad9322d commit 5feebdd

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

builtin/merge.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,14 @@ static void restore_state(const struct object_id *head,
393393
}
394394

395395
/* This is called when no merge was necessary. */
396-
static void finish_up_to_date(const char *msg)
396+
static void finish_up_to_date(void)
397397
{
398-
if (verbosity >= 0)
399-
printf("%s%s\n", squash ? _(" (nothing to squash)") : "", msg);
398+
if (verbosity >= 0) {
399+
if (squash)
400+
puts(_("Already up to date. (nothing to squash)"));
401+
else
402+
puts(_("Already up to date."));
403+
}
400404
remove_merge_branch_state(the_repository);
401405
}
402406

@@ -1522,7 +1526,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
15221526
* If head can reach all the merge then we are up to date.
15231527
* but first the most common case of merging one remote.
15241528
*/
1525-
finish_up_to_date(_("Already up to date."));
1529+
finish_up_to_date();
15261530
goto done;
15271531
} else if (fast_forward != FF_NO && !remoteheads->next &&
15281532
!common->next &&
@@ -1610,7 +1614,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
16101614
}
16111615
}
16121616
if (up_to_date) {
1613-
finish_up_to_date(_("Already up to date. Yeeah!"));
1617+
finish_up_to_date();
16141618
goto done;
16151619
}
16161620
}

merge-ort-wrappers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int merge_ort_nonrecursive(struct merge_options *opt,
3030
return -1;
3131

3232
if (oideq(&merge_base->object.oid, &merge->object.oid)) {
33-
printf(_("Already up to date!"));
33+
printf_ln(_("Already up to date."));
3434
return 1;
3535
}
3636

merge-recursive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3462,7 +3462,7 @@ static int merge_trees_internal(struct merge_options *opt,
34623462
}
34633463

34643464
if (oideq(&merge_base->object.oid, &merge->object.oid)) {
3465-
output(opt, 0, _("Already up to date!"));
3465+
output(opt, 0, _("Already up to date."));
34663466
*result = head;
34673467
return 1;
34683468
}

notes-merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ int notes_merge(struct notes_merge_options *o,
628628
if (oideq(&remote->object.oid, base_oid)) {
629629
/* Already merged; result == local commit */
630630
if (o->verbosity >= 2)
631-
printf("Already up to date!\n");
631+
printf_ln("Already up to date.");
632632
oidcpy(result_oid, &local->object.oid);
633633
goto found_result;
634634
}

0 commit comments

Comments
 (0)