From 5b3b601f4e408364a2e1410dae5ae1252e56da00 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 22 May 2023 03:01:46 +0200 Subject: [PATCH] Merge message template support for rebase without merge commit (#22669) Use `default_merge_message/REBASE_TEMPLATE.md` for amending the message of the last commit in the list of commits that was merged. Previously this template was mentioned in the documentation but not actually used. In this template additional variables `CommitTitle` and `CommitBody` are available, for the title and body of the commit. Ideally the message of every commit would be updated using the template, but doing an interactive rebase or merging commits one by one is complicated, so that is left as a future improvement. --- doc/usage/merge-message-templates.en-us.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/usage/merge-message-templates.en-us.md b/doc/usage/merge-message-templates.en-us.md index 751f07e1..03095a3b 100644 --- a/doc/usage/merge-message-templates.en-us.md +++ b/doc/usage/merge-message-templates.en-us.md @@ -48,3 +48,10 @@ You can use the following variables enclosed in `${}` inside these templates whi - PullRequestIndex: Pull request's index number - PullRequestReference: Pull request's reference char with index number. i.e. #1, !2 - ClosingIssues: return a string contains all issues which will be closed by this pull request i.e. `close #1, close #2` + +## Rebase + +When rebasing without a merge commit, `REBASE_TEMPLATE.md` modifies the message of the last commit. The following additional variables are available in this template: + +- CommitTitle: Commit's title +- CommitBody: Commits's body text