git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stephan Beyer <s-beyer@gmx.net>
Date
Aug 13, 2008, 20:58 UTC
Message-ID
<20080813205806.GC10758@leksak.fem-net>
In-Reply-To
<23b4780a3a7bbe06f4157b6843d1d9dab26d7087.1218628444.git.trast@student.ethz.ch>
Hi,
Thomas Rast wrote:
Show 24 quoted lines
> 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
Previous: Thomas RastNext: Thomas Rast
Message 7 of 10 in “[BUG?] rebase -i -p leaves index changed”
  1. Thomas RastAug 12, 2008
  2. 1/2 rebase -i -p: handle index and workdir correctlyThomas Rast, Aug 13, 2008
  3. 2/2 rebase -i -p: fix parent rewritingThomas Rast, Aug 13, 2008
  4. Thomas RastAug 13, 2008
  5. 1/2 rebase -i -p: handle index and workdir correctlyThomas Rast, Aug 13, 2008
  6. 2/2 rebase -i -p: fix parent rewritingThomas Rast, Aug 13, 2008
  7. Stephan BeyerAug 13, 2008
  8. 1/2 rebase -i -p: handle index and workdir correctlyThomas Rast, Aug 13, 2008
  9. 2/2 rebase -i -p: fix parent rewritingThomas Rast, Aug 13, 2008
  10. Stephan BeyerAug 13, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.