Re: [PATCH v2] subtree: force merge commit
From: Junio C Hamano <hidden>
Date: 2021-11-18 04:54:03
"Thomas Koutcher via GitGitGadget" [off-list ref] writes:
From: Thomas Koutcher <redacted> 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. Reviewed-by: Ævar Arnfjörð Bjarmason <redacted> Reviewed-by: Junio C Hamano <redacted>
Reviewed-by: is a bit tricky. If you are sending a corrected version after other people just took a look at a previous iteration, you cannot generally have them for two reasons. First of all, they haven't said that you can have Reviewed-by: under there name (which means that they are completely satisfied after giving a thorough analysis). Also, the version you are sending is different from what they reviewed, so even if they were happy with the previous iteration, it does not mean they would be with this version.
quoted hunk ↗ jump to hunk
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 7f767b5c38f..cb51aee4cbf 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 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 }
Thanks. I'll drop these two reviewed-by lines while queuing.