From 920f22e6bc2ddc28b1d70eb8167fe17f0f1601eb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 22 Dec 2017 15:10:02 +0100 Subject: merge: allow reading the merge commit message from a file This is consistent with `git commit` which, like `git merge`, supports passing the commit message via `-m ` and, unlike `git merge` before this patch, via `-F `. It is useful to allow this for scripted use, or for the upcoming patch to allow (re-)creating octopus merges in `git rebase --rebase-merges`. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-merge.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt index 6a5c00e2c2..537dca7faa 100644 --- a/Documentation/git-merge.txt +++ b/Documentation/git-merge.txt @@ -12,7 +12,7 @@ SYNOPSIS 'git merge' [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] [-s ] [-X ] [-S[]] [--[no-]allow-unrelated-histories] - [--[no-]rerere-autoupdate] [-m ] [...] + [--[no-]rerere-autoupdate] [-m ] [-F ] [...] 'git merge' --abort 'git merge' --continue @@ -75,6 +75,14 @@ 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. +-F :: +--file=:: + Read the commit message to be used for the merge commit (in + case one is created). ++ +If `--log` is specified, a shortlog of the commits being merged +will be appended to the specified message. + --[no-]rerere-autoupdate:: Allow the rerere mechanism to update the index with the result of auto-conflict resolution if possible. -- cgit v1.2.3 From caafecfcf13e58b474c33db093c9deacd11ceb08 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 9 Mar 2018 17:36:47 +0100 Subject: rebase --rebase-merges: adjust man page for octopus support Now that we support octopus merges in the `--rebase-merges` mode, we should give users who actually read the manuals a chance to know about this fact. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- Documentation/git-rebase.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt index 0e20a66e73..c4bcd24bb5 100644 --- a/Documentation/git-rebase.txt +++ b/Documentation/git-rebase.txt @@ -879,8 +879,8 @@ rescheduled immediately, with a helpful message how to edit the todo list (this typically happens when a `reset` command was inserted into the todo list manually and contains a typo). -The `merge` command will merge the specified revision into whatever is -HEAD at that time. With `-C `, the commit message of +The `merge` command will merge the specified revision(s) into whatever +is HEAD at that time. With `-C `, the commit message of the specified merge commit will be used. When the `-C` is changed to a lower-case `-c`, the message will be opened in an editor after a successful merge so that the user can edit the message. @@ -889,7 +889,8 @@ If a `merge` command fails for any reason other than merge conflicts (i.e. when the merge operation did not even start), it is rescheduled immediately. At this time, the `merge` command will *always* use the `recursive` -merge strategy, with no way to choose a different one. To work around +merge strategy for regular merges, and `octopus` for octopus merges, +strategy, with no way to choose a different one. To work around this, an `exec` command can be used to call `git merge` explicitly, using the fact that the labels are worktree-local refs (the ref `refs/rewritten/onto` would correspond to the label `onto`, for example). -- cgit v1.2.3