All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] subtree: ignore merge.ff setting
@ 2021-11-14 15:07 Thomas Koutcher via GitGitGadget
  2021-11-14 17:54 ` Ævar Arnfjörð Bjarmason
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thomas Koutcher via GitGitGadget @ 2021-11-14 15:07 UTC (permalink / raw)
  To: git; +Cc: Thomas Koutcher, Thomas Koutcher

From: Thomas Koutcher <thomas.koutcher@online.fr>

When `merge.ff` is set to `only` in .gitconfig, `git subtree pull` will
fail with error `fatal: Not possible to fast-forward, aborting.`. This
fix ignores the `merge.ff` setting when using `git merge` within subtree.

Signed-off-by: Thomas Koutcher <thomas.koutcher@online.fr>
---
    subtree: ignore merge.ff setting
    
    When merge.ff is set to only in .gitconfig, git subtree pull will fail
    with error fatal: Not possible to fast-forward, aborting.. This fix
    ignores the merge.ff setting when using git merge within subtree.
    
    Signed-off-by: Thomas Koutcher thomas.koutcher@online.fr

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1139%2Fkoutcher%2Fsubtree-merge-ff-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1139/koutcher/subtree-merge-ff-fix-v1
Pull-Request: https://github.com/git/git/pull/1139

 contrib/subtree/git-subtree.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 7f767b5c38f..de918d9fb05 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -976,10 +976,10 @@ cmd_merge () {
 
 	if test -n "$arg_addmerge_message"
 	then
-		git merge -Xsubtree="$arg_prefix" \
+		git -c merge.ff= merge -Xsubtree="$arg_prefix" \
 			--message="$arg_addmerge_message" "$rev"
 	else
-		git merge -Xsubtree="$arg_prefix" $rev
+		git -c merge.ff= merge -Xsubtree="$arg_prefix" $rev
 	fi
 }
 

base-commit: 5fbd2fc5997dfa4d4593a862fe729b1e7a89bcf8
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-02-01 23:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-14 15:07 [PATCH] subtree: ignore merge.ff setting Thomas Koutcher via GitGitGadget
2021-11-14 17:54 ` Ævar Arnfjörð Bjarmason
2021-11-14 18:38 ` Junio C Hamano
2021-11-14 21:45 ` [PATCH v2] subtree: force merge commit Thomas Koutcher via GitGitGadget
2021-11-18  4:53   ` Junio C Hamano
2021-11-18  6:06     ` Thomas Koutcher
2022-02-01 17:26     ` [PATCH RESEND] " Johannes Altmanninger
2022-02-01 19:19       ` Junio C Hamano
2022-02-01 19:53         ` Johannes Altmanninger
2022-02-01 23:20           ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.