Re: [PATCH v2] subtree: force merge commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Thomas Koutcher via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Thomas Koutcher <thomas.koutcher@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> Reviewed-by: Junio C Hamano <gitster@xxxxxxxxx>

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.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux