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>2020-07-30 20:06:42 +0300
committerJunio C Hamano <gitster@pobox.com>2020-07-30 22:41:49 +0300
commit21531927e4e1b9fdf524983414ee59558cb4f3d6 (patch)
treeee983ff87cb5f89572dbf828af69a3f10dbc491f /fmt-merge-msg.c
parent489947cee5095b168cbac111ff7bd1eadbbd90dd (diff)
Revert "fmt-merge-msg: stop treating `master` specially"
This reverts commit 489947cee5095b168cbac111ff7bd1eadbbd90dd, which stopped treating merges into the 'master' branch as special when preparing the default merge message. As the goal was not to have any single branch designated as special, it solved it by leaving the "into <branchname>" at the end of the title of the default merge message for any and all branches. An obvious and easy alternative to treat everybody equally could have been to remove it for every branch, but that involves loss of information. We'll introduce a new mechanism to let end-users specify merges into which branches would omit the "into <branchname>" from the title of the default merge message, and make the mechanism, when unconfigured, treat the traditional 'master' special again, so all the changes to the tests we made earlier will become unnecessary, as these tests will be run without configuring the said new mechanism. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fmt-merge-msg.c')
-rw-r--r--fmt-merge-msg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
index cfb8ff2f33..72d32bd73b 100644
--- a/fmt-merge-msg.c
+++ b/fmt-merge-msg.c
@@ -451,7 +451,10 @@ static void fmt_merge_msg_title(struct strbuf *out,
strbuf_addf(out, " of %s", srcs.items[i].string);
}
- strbuf_addf(out, " into %s\n", current_branch);
+ if (!strcmp("master", current_branch))
+ strbuf_addch(out, '\n');
+ else
+ strbuf_addf(out, " into %s\n", current_branch);
}
static void fmt_tag_signature(struct strbuf *tagbuf,