git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 1/2] rebase -i -p: handle index and workdir correctly
Date: Wed, 13 Aug 2008 22:58:06 +0200	[thread overview]
Message-ID: <20080813205806.GC10758@leksak.fem-net> (raw)
In-Reply-To: <23b4780a3a7bbe06f4157b6843d1d9dab26d7087.1218628444.git.trast@student.ethz.ch>

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@student.ethz.ch>
> ---
>  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@gmx.net>, PGP 0x6EDDD207FCC5040F

  parent reply	other threads:[~2008-08-13 20:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12  9:16 [BUG?] rebase -i -p leaves index changed Thomas Rast
2008-08-13 10:04 ` [PATCH 1/2] rebase -i -p: handle index and workdir correctly Thomas Rast
2008-08-13 10:04   ` [PATCH 2/2] rebase -i -p: fix parent rewriting Thomas Rast
2008-08-13 10:07   ` [PATCH 1/2] rebase -i -p: handle index and workdir correctly Thomas Rast
2008-08-13 11:56     ` [PATCH v2 " Thomas Rast
2008-08-13 11:57       ` [PATCH v2 2/2] rebase -i -p: fix parent rewriting Thomas Rast
2008-08-13 20:58       ` Stephan Beyer [this message]
2008-08-13 21:41         ` [PATCH v3 1/2] rebase -i -p: handle index and workdir correctly Thomas Rast
2008-08-13 21:41           ` [PATCH v3 2/2] rebase -i -p: fix parent rewriting Thomas Rast
2008-08-13 20:51 ` [BUG?] rebase -i -p leaves index changed Stephan Beyer

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=20080813205806.GC10758@leksak.fem-net \
    --to=s-beyer@gmx.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=trast@student.ethz.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).