All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Thomas Koutcher via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Thomas Koutcher" <thomas.koutcher@online.fr>
Subject: Re: [PATCH v2] subtree: force merge commit
Date: Wed, 17 Nov 2021 20:53:59 -0800	[thread overview]
Message-ID: <xmqqpmqy12u0.fsf@gitster.g> (raw)
In-Reply-To: pull.1139.v2.git.git.1636926322423.gitgitgadget@gmail.com

"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.

  reply	other threads:[~2021-11-18  4:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqpmqy12u0.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=thomas.koutcher@online.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.