Re: [PATCH v2 1/2] rebase -i -p: handle index and workdir correctly

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

 



Hi,

Thomas Rast wrote:
> Also, it attempted to do a fast forward even if it was instructed not
> to commit (via -n).  Fall back to the cherry-pick code path and let
> that handle the issue for us.
> 
> Signed-off-by: Thomas Rast <trast@xxxxxxxxxxxxxxx>
> ---
>  git-rebase--interactive.sh    |   13 ++++++++++++-
>  t/t3404-rebase-interactive.sh |    6 ++++++
>  2 files changed, 18 insertions(+), 1 deletions(-)
> 
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index 4e334ba..1dc24b1 100755
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -145,7 +145,16 @@ pick_one () {
>  }
>  
>  pick_one_preserving_merges () {
> -	case "$1" in -n) sha1=$2 ;; *) sha1=$1 ;; esac
> +	fast_forward=t
> +	case "$1" in
> +	-n)
> +		fast_forward=f
> +		sha1=$2

The intention of setting fast_forward=f is clear, but it is overwritten
later on line 169 that is not shown in this patch:

168:	# rewrite parents; if none were rewritten, we can fast-forward.
169:	fast_forward=t

Clearly, this is due to your patch split, because after the second
patch, this is fixed.

The rest of this patch seems to be ok to me.

Regards.

-- 
Stephan Beyer <s-beyer@xxxxxxx>, PGP 0x6EDDD207FCC5040F
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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