From: Elijah Newren <newren@gmail.com>
To: Norbert Kiesel <nkiesel@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: "git rebase" behavior change in 2.26.0
Date: Wed, 25 Mar 2020 20:37:22 -0700 [thread overview]
Message-ID: <CABPp-BHMMw+L6fgfdVEEXnhH0w0aK6KfKA9Aq+aSuzWD0Cgr8g@mail.gmail.com> (raw)
In-Reply-To: <CAM+g_NsUfw6zDRj8H1VNdheKFSHgC9gz7nVy0vbtpTKkYzjjtA@mail.gmail.com>
Ooh, the plot thickens...
On Wed, Mar 25, 2020 at 6:46 PM Norbert Kiesel <nkiesel@gmail.com> wrote:
>
> Here is a concrete example:
>
> lt-nkiesel:~Platform(nextrelease)% git -c rebase.backend=merge -c
> pull.rebase=false -c branch.nextrelease.rebase=true pull
So pull.rebase is false for the general case, but it should be true
when on the nextrelease branch. Your prompt seems to imply you are on
the nextrelease branch, but I'm not so sure because...
> remote: Enumerating objects: 1, done.
> remote: Counting objects: 100% (1/1), done.
> remote: Total 1 (delta 0), reused 0 (delta 0)
> Unpacking objects: 100% (1/1), 279 bytes | 279.00 KiB/s, done.
> From msgit.rnd.metricstream.com:platform/Platform7
> d008080d3f2..db4042856da nextrelease -> origin/nextrelease
> Updating d008080d3f2..db4042856da
> Fast-forward
"Fast-forward" is a message from builtin/merge.c, it implies that
rebase is not invoked at all. (rebase with the merge backend calls
merge-recursive.c, not builtin/merge.c) This suggests that
pull.$branch.rebase isn't working as we intended.
> modules/bpcsfw/src/main/java/com/metricstream/systemi/client/servlet/servant/BaseViewController.java
> | 54 +++++++++++++++++++++++++-----------------------------
> modules/bpcsfw/src/main/java/com/metricstream/util/HttpUtils.java
> | 5 +++++
> 2 files changed, 30 insertions(+), 29 deletions(-)
Diffstats are also off by default for rebases, so unless you've set
rebase.stat in some config somewhere, this also suggests that a merge
was used.
Now, when I try to duplicate, just for fun I added some 'die("You ran
a merge!")' and 'die("You ran a rebase!")' lines early in
builtin/{merge,rebase}.c, just so I could verify what was run. Then I
tried to use a command line similar to yours:
$ git -c rebase.backend=merge -c pull.rebase=false -c
branch.master.rebase=true pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 250 bytes | 250.00 KiB/s, done.
From /home/newren/floss/git/testing/pull-rebase-orig-head/repo
c911eef..2ccdb90 master -> origin/master
fatal: You ran a merge!
fatal: You ran a rebase!
Say, WAT?!? This attempted to run both a merge and a rebase? That
appears to be yet another bug.
> Successfully rebased and updated refs/heads/nextrelease.
> lt-nkiesel:~Platform(nextrelease)% git rev-parse ORIG_HEAD
> db4042856da8338f183c831fca92cf63da7988bd
> lt-nkiesel:~Platform(nextrelease)% git rev-parse HEAD
> db4042856da8338f183c831fca92cf63da7988bd
> lt-nkiesel:~Platform(nextrelease)%
>
> As you can see, git said "Fast-forward" (i.e. no need to rebase) but
> nevertheless after that pull ORIG_HEAD is identical to HEAD
When I remove the die() calls that I added, here's what I see:
$ git -c rebase.backend=merge -c pull.rebase=false -c
branch.master.rebase=true pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 251 bytes | 251.00 KiB/s, done.
From /home/newren/floss/git/testing/pull-rebase-orig-head/repo
100c273..c911eef master -> origin/master
Updating 100c273..c911eef
Fast-forward
numbers | 1 +
1 file changed, 1 insertion(+)
Current branch master is up to date.
$ git log --oneline --reverse
9691d52 initial
1d5a4c1 add another
0da5805 add another
ccea292 add another
100c273 add another
c911eef (HEAD -> master, origin/master, origin/HEAD) add another
$ git rev-parse --short ORIG_HEAD
100c273
In other words, ORIG_HEAD does not match HEAD, it correctly points at
the old commit. So, we found a couple bugs, but I still can't
duplicate the bug you're reporting. What else is different about your
setup? What's in your .git/config, and in your $HOME/.gitconfig?
What hooks do you have setup in .git/hooks/ -- do any of them do a
reset --hard?
next prev parent reply other threads:[~2020-03-26 3:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 3:38 "git rebase" behavior change in 2.26.0 Norbert Kiesel
2020-03-25 5:39 ` Jeff King
2020-03-25 21:21 ` Elijah Newren
[not found] ` <CAM+g_NtHC5ukU3jchVfud_H_m_h29UQ8vmwQoND8s_Q9Hv70Fg@mail.gmail.com>
2020-03-26 1:37 ` Norbert Kiesel
2020-03-26 1:46 ` Norbert Kiesel
2020-03-26 3:37 ` Elijah Newren [this message]
2020-03-26 6:32 ` Elijah Newren
2020-03-26 7:28 ` Jeff King
[not found] ` <CAM+g_NthmmJh3=Tp3ea6PmDr1h2-WtpiSTO8q02V3judc9p-Kg@mail.gmail.com>
2020-03-27 18:01 ` Norbert Kiesel
2020-03-27 18:34 ` Elijah Newren
2020-03-27 20:59 ` Elijah Newren
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=CABPp-BHMMw+L6fgfdVEEXnhH0w0aK6KfKA9Aq+aSuzWD0Cgr8g@mail.gmail.com \
--to=newren@gmail.com \
--cc=git@vger.kernel.org \
--cc=nkiesel@gmail.com \
--cc=peff@peff.net \
/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).