Message ID | pull.1139.v2.git.git.1636926322423.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 9158a3564a970def3375a79e8f3f90927cd8e793 |
Headers | show |
Series | [v2] subtree: force merge commit | expand |
"Thomas Koutcher via GitGitGadget" <gitgitgadget@gmail.com> writes: > 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.`, 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 <avarab@gmail.com> > Reviewed-by: Junio C Hamano <gitster@pobox.com> 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. > 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.
Le 18/11/2021 à 05:53, Junio C Hamano a écrit : > 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. Thanks for the clarification and sorry for the confusion I created.
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 }