From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Nazri Ramliy <ayiehere@gmail.com>
Cc: Jacob Keller <jacob.keller@gmail.com>,
Markus Wiederkehr <markus.wiederkehr@gmail.com>,
Git mailing list <git@vger.kernel.org>
Subject: Re: git rebase: retain original head?
Date: Thu, 28 Feb 2019 11:10:14 +0100 (STD) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.1902281008000.41@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <CAEY4ZpPQxCVY5dZ_K9NRqF=YB0=s1nnJhnuDzL+ZytJ5uO2N7g@mail.gmail.com>
Hi Nazri,
On Wed, 27 Feb 2019, Nazri Ramliy wrote:
> On Wed, Jan 9, 2019 at 10:08 PM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
Oh wow. Better late than never, eh?
> > Having said that, it is an unintended regression in the built-in
> > rebase. Markus, could you come up with a minimal test case, preferably
> > in the form of a patch to t/t3415-rebase-autosquash.sh?
>
> Something like this, perhaps? ("gmail converts tabs to spaces" caveat
> applies to the diff formatting):
>
> --8<--
> diff --git t/t3400-rebase.sh t/t3400-rebase.sh
> index 3e73f7584c..cb55597a8b 100755
> --- t/t3400-rebase.sh
> +++ t/t3400-rebase.sh
> @@ -59,6 +59,13 @@ test_expect_success 'rebase against master' '
> git rebase master
> '
>
> +test_expect_success 'rebase sets ORIG_HEAD' '
> + echo Add B. > expect &&
> + echo Modify A. >> expect &&
> + git log --oneline --format=%s ORIG_HEAD.. > actual &&
> + test_cmp expect actual
> +'
> +
> test_expect_success 'rebase, with <onto> and <upstream> specified as
> :/quuxery' '
> test_when_finished "git branch -D torebase" &&
> git checkout -b torebase my-topic-branch^ &&
> -->8--
I made it a little more stand-alone, and can confirm that this is now
safely a regression in v2.21.0.
> Bisect shows that the first bad commit is this one:
>
> commit 21853626eac565dd42572d90724b29863f61eb3b
> Author: Johannes Schindelin <johannes.schindelin@gmx.de>
> Date: Fri Jan 18 07:09:27 2019 -0800
>
> built-in rebase: call `git am` directly
>
> I verified that by undoing the crux of that commit, and that fixes the
> failing test:
>
> -->8--
> diff --git builtin/rebase.c builtin/rebase.c
> index 7c7bc13e91..848f6740a0 100644
> --- builtin/rebase.c
> +++ builtin/rebase.c
> @@ -728,11 +728,6 @@ static int run_specific_rebase(struct rebase_options *opts)
> goto finished_rebase;
> }
>
> - if (opts->type == REBASE_AM) {
> - status = run_am(opts);
> - goto finished_rebase;
> - }
> -
> add_var(&script_snippet, "GIT_DIR", absolute_path(get_git_dir()));
> add_var(&script_snippet, "state_dir", opts->state_dir);
>
> --8<--
>
> But something seems off by my bisection in that the "bad" commit
> happens about 10 days after this email thread :/
Yep, I had fixed the issue before this commit, and a regression test would
have come in handy to prevent that regression from creeping in *again*.
Anyway, I'm on it.
Johannes
P.S.: If you want to follow my progress, I'll push updates to the
rebase-am-and-orig-head branch at https://github.com/dscho/git.
prev parent reply other threads:[~2019-02-28 10:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-08 15:06 git rebase: retain original head? Markus Wiederkehr
2019-01-08 17:43 ` Andreas Schwab
2019-01-08 20:38 ` Markus Wiederkehr
2019-01-08 20:51 ` Andreas Schwab
2019-01-09 13:48 ` Markus Wiederkehr
2019-01-08 21:22 ` Jacob Keller
2019-01-09 14:05 ` Johannes Schindelin
2019-01-09 15:08 ` Markus Wiederkehr
2019-01-11 10:42 ` Johannes Schindelin
2019-02-27 5:45 ` Nazri Ramliy
2019-02-28 10:10 ` Johannes Schindelin [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.1902281008000.41@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=ayiehere@gmail.com \
--cc=git@vger.kernel.org \
--cc=jacob.keller@gmail.com \
--cc=markus.wiederkehr@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).