1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-20 20:26:08 +02:00

subtree: force merge commit

When `merge.ff` is set to `only` in .gitconfig, `git subtree pull` will
fail with error `fatal: Not possible to fast-forward, aborting.`, but
the command does want to make merges in these places. Add `--no-ff`
argument to `git merge` to enforce this behaviour.

Signed-off-by: Thomas Koutcher <thomas.koutcher@online.fr>
Reviewed-by: Johannes Altmanninger <aclopte@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thomas Koutcher 2022-02-01 18:26:04 +01:00 committed by Junio C Hamano
parent 4c53a8c20f
commit 9158a3564a

View File

@ -975,10 +975,10 @@ cmd_merge () {
if test -n "$arg_addmerge_message"
then
git merge -Xsubtree="$arg_prefix" \
git merge --no-ff -Xsubtree="$arg_prefix" \
--message="$arg_addmerge_message" "$rev"
else
git merge -Xsubtree="$arg_prefix" $rev
git merge --no-ff -Xsubtree="$arg_prefix" $rev
fi
}