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:
parent
4c53a8c20f
commit
9158a3564a
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user