diff options
author | Thomas Koutcher <thomas.koutcher@online.fr> | 2022-02-01 18:26:04 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-01 11:31:51 -0800 |
commit | 9158a3564a970def3375a79e8f3f90927cd8e793 (patch) | |
tree | 8405cbc4d06a4970c3dd4737368603c783989d42 /contrib/subtree/git-subtree.sh | |
parent | Git 2.35.1 (diff) | |
download | tgif-9158a3564a970def3375a79e8f3f90927cd8e793.tar.xz |
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/subtree/git-subtree.sh')
-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 } |