Merge branch 'jc/merge-detached-head-name'

The default merge message prepared by "git merge" records the name
of the current branch; the name can be overridden with a new option
to allow users to pretend a merge is made on a different branch.

* jc/merge-detached-head-name:
  merge: allow to pretend a merge is made into a different branch
This commit is contained in:
Junio C Hamano
2022-01-05 14:01:29 -08:00
7 changed files with 67 additions and 5 deletions

View File

@ -9,7 +9,7 @@ git-fmt-merge-msg - Produce a merge commit message
SYNOPSIS
--------
[verse]
'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log]
'git fmt-merge-msg' [-m <message>] [--into-name <branch>] [--log[=<n>] | --no-log]
'git fmt-merge-msg' [-m <message>] [--log[=<n>] | --no-log] -F <file>
DESCRIPTION
@ -44,6 +44,10 @@ OPTIONS
Use <message> instead of the branch names for the first line
of the log message. For use with `--log`.
--into-name <branch>::
Prepare the merge message as if merging to the branch `<branch>`,
instead of the name of the real branch to which the merge is made.
-F <file>::
--file <file>::
Take the list of merged objects from <file> instead of

View File

@ -12,7 +12,8 @@ SYNOPSIS
'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit]
[--no-verify] [-s <strategy>] [-X <strategy-option>] [-S[<keyid>]]
[--[no-]allow-unrelated-histories]
[--[no-]rerere-autoupdate] [-m <msg>] [-F <file>] [<commit>...]
[--[no-]rerere-autoupdate] [-m <msg>] [-F <file>]
[--into-name <branch>] [<commit>...]
'git merge' (--continue | --abort | --quit)
DESCRIPTION
@ -76,6 +77,11 @@ The 'git fmt-merge-msg' command can be
used to give a good default for automated 'git merge'
invocations. The automated message can include the branch description.
--into-name <branch>::
Prepare the default merge message as if merging to the branch
`<branch>`, instead of the name of the real branch to which
the merge is made.
-F <file>::
--file=<file>::
Read the commit message to be used for the merge commit (in