diff options
author | Thomas Koutcher <thomas.koutcher@online.fr> | 2022-02-01 20:26:04 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-01 22:31:51 +0300 |
commit | 9158a3564a970def3375a79e8f3f90927cd8e793 (patch) | |
tree | 8405cbc4d06a4970c3dd4737368603c783989d42 /contrib | |
parent | 4c53a8c20f8984adb226293a3ffd7b88c3f4ac1a (diff) |
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>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/subtree/git-subtree.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 71f1fd94bd..1af1d9653e 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -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 } |