git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Norbert Kiesel <nkiesel@gmail.com>
Cc: Jeff King <peff@peff.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: "git rebase" behavior change in 2.26.0
Date: Fri, 27 Mar 2020 11:34:36 -0700	[thread overview]
Message-ID: <CABPp-BHihQjMc9qugVtVTZVduRxLYUAhf18R5c=3Lb5bcRzjAw@mail.gmail.com> (raw)
In-Reply-To: <CAM+g_NtV5iUM=VJHOX7Um2DFLzjq-x76TYa_P_U6q5HBRmCY=A@mail.gmail.com>

On Fri, Mar 27, 2020 at 11:01 AM Norbert Kiesel <nkiesel@gmail.com> wrote:
>
> I ran a "pull" today morning w/o sufficient coffee and thus forgot to
> disable the "pull.rebase" and was bitten by that again.  Here is what
> I see when using "GIT_TRACE2=1 git -c pull.rebase=true pull
> --ff-only":
> ...
> 10:54:50.578673 run-command.c:735                 child_start[2] git
> merge --ff-only FETCH_HEAD
> 10:54:50.580385 common-main.c:48                  version 2.26.0
> 10:54:50.580404 common-main.c:49                  start
> /usr/lib/git-core/git merge --ff-only FETCH_HEAD
> 10:54:50.580587 repository.c:130                  worktree
> /home/nkiesel/work/Platform
> 10:54:50.580785 git.c:440                         cmd_name merge (pull/merge)
> Already up to date.
> 10:54:50.589803 git.c:674                         exit elapsed:0.009835 code:0
> 10:54:50.589827 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.009874 code:0
> 10:54:50.590887 run-command.c:990                 child_exit[2]
> pid:939370 code:0 elapsed:0.012205
> 10:54:50.590919 run-command.c:735                 child_start[3] git
> rebase --onto d0527895a4df44f00162b68011b803e597fd400f
> d0527895a4df44f00162b68011b803e597fd400f
> 10:54:50.592396 common-main.c:48                  version 2.26.0
> 10:54:50.592412 common-main.c:49                  start
> /usr/lib/git-core/git rebase --onto
> d0527895a4df44f00162b68011b803e597fd400f
> d0527895a4df44f00162b68011b803e597fd400f
> 10:54:50.592568 repository.c:130                  worktree
> /home/nkiesel/work/Platform
> 10:54:50.592714 git.c:440                         cmd_name rebase (pull/rebase)
> 10:54:50.593142 builtin/rebase.c:1669             cmd_mode undefined
> 10:54:50.614154 run-command.c:735                 child_start[0] git
> checkout d0527895a4df44f00162b68011b803e597fd400f
> 10:54:50.678813 run-command.c:990                 child_exit[0]
> pid:939392 code:0 elapsed:0.064656
> Successfully rebased and updated refs/heads/nextrelease.
> 10:54:50.697724 git.c:674                         exit elapsed:0.105715 code:0
> 10:54:50.697734 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.105729 code:0
> 10:54:50.698307 run-command.c:990                 child_exit[3]
> pid:939371 code:0 elapsed:0.107373
> 10:54:50.698343 git.c:674                         exit elapsed:5.904200 code:0
> 10:54:50.698354 trace2/tr2_tgt_normal.c:123       atexit elapsed:5.904211 code:0
>
> I would argue that "--ff-only" would mean to never rebase, but clearly
> git runs a rebase of HEAD onto HEAD and i assume by that setting
> ORIG_HEAD to HEAD as colloquial damage.

When I run the exact same command in my test repo, I see:

[newren@tiger clone]$ GIT_TRACE2=1 git -c pull.rebase=true pull --ff-only
11:13:16.376197 common-main.c:48                  version 2.26.0
11:13:16.376228 common-main.c:49                  start
/home/newren/floss/git/git -c pull.rebase=true pull --ff-only
11:13:16.376457 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.376605 git.c:440                         cmd_name pull (pull)
11:13:16.378095 run-command.c:735                 child_start[0] git
merge-base --fork-point refs/remotes/origin/master master
11:13:16.380766 run-command.c:990                 child_exit[0]
pid:1247445 code:0 elapsed:0.002662
11:13:16.380827 run-command.c:735                 child_start[1] git
fetch --update-head-ok
11:13:16.382368 common-main.c:48                  version 2.26.0
11:13:16.382388 common-main.c:49                  start
/home/newren/floss/git/git fetch --update-head-ok
11:13:16.382493 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.382579 git.c:440                         cmd_name fetch (pull/fetch)
11:13:16.383141 run-command.c:735                 child_start[0]
'git-upload-pack
'\''/home/newren/floss/git/testing/pull-rebase-orig-head/repo/'\'''
11:13:16.386079 common-main.c:48                  version 2.26.0
11:13:16.386096 common-main.c:49                  start
git-upload-pack
/home/newren/floss/git/testing/pull-rebase-orig-head/repo/
11:13:16.386119 git.c:440                         cmd_name upload-pack
(pull/fetch/upload-pack)
11:13:16.388828 run-command.c:735                 child_start[0] git
pack-objects --revs --thin --stdout --progress --delta-base-offset
--include-tag
remote: 11:13:16.390448 common-main.c:48                  version 2.26.0
remote: 11:13:16.390464 common-main.c:49                  start
/home/newren/floss/git/git pack-objects --revs --thin --stdout
--progress --delta-base-offset --include-tag
remote: 11:13:16.390554 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/repo/.git
remote: 11:13:16.390670 git.c:440                         cmd_name
pack-objects (pull/fetch/upload-pack/pack-objects)
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
11:13:16.392266 run-command.c:735                 child_start[1] git
unpack-objects --pack_header=2,3
remote: 11:13:16.392261 git.c:674                         exit
elapsed:0.002147 code:0
remote: 11:13:16.392274 trace2/tr2_tgt_normal.c:123       atexit
elapsed:0.002162 code:0
11:13:16.392507 run-command.c:990                 child_exit[0]
pid:1247449 code:0 elapsed:0.003677
11:13:16.393548 common-main.c:48                  version 2.26.0
11:13:16.393560 common-main.c:49                  start
/home/newren/floss/git/git unpack-objects --pack_header=2,3
11:13:16.393691 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.393832 git.c:440                         cmd_name
unpack-objects (pull/fetch/unpack-objects)
Unpacking objects: 100% (3/3), 252 bytes | 252.00 KiB/s, done.
11:13:16.394854 git.c:674                         exit elapsed:0.001576 code:0
11:13:16.394865 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.001588 code:0
11:13:16.395069 run-command.c:990                 child_exit[1]
pid:1247450 code:0 elapsed:0.002802
11:13:16.395157 git.c:674                         exit elapsed:0.009406 code:0
11:13:16.395176 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.009429 code:0
11:13:16.395394 run-command.c:990                 child_exit[0]
pid:1247447 code:0 elapsed:0.012252
11:13:16.395476 run-command.c:735                 child_start[2] git
rev-list --objects --stdin --not --all --quiet --alternate-refs
11:13:16.396725 common-main.c:48                  version 2.26.0
11:13:16.396738 common-main.c:49                  start
/home/newren/floss/git/git rev-list --objects --stdin --not --all
--quiet --alternate-refs
11:13:16.396855 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.396927 git.c:440                         cmd_name rev-list
(pull/fetch/rev-list)
11:13:16.397946 git.c:674                         exit elapsed:0.001493 code:0
11:13:16.397959 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.001511 code:0
11:13:16.398176 run-command.c:990                 child_exit[2]
pid:1247451 code:0 elapsed:0.002694
From /home/newren/floss/git/testing/pull-rebase-orig-head/repo
   2ccdb90..2c21563  master     -> origin/master
11:13:16.399051 run-command.c:735                 child_start[3] git gc --auto
11:13:16.400295 common-main.c:48                  version 2.26.0
11:13:16.400309 common-main.c:49                  start
/home/newren/floss/git/git gc --auto
11:13:16.400413 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.400508 git.c:440                         cmd_name gc (pull/fetch/gc)
11:13:16.400708 git.c:674                         exit elapsed:0.000696 code:0
11:13:16.400719 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.000708 code:0
11:13:16.400909 run-command.c:990                 child_exit[3]
pid:1247452 code:0 elapsed:0.001853
11:13:16.400939 git.c:674                         exit elapsed:0.018943 code:0
11:13:16.400958 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.018962 code:0
11:13:16.401150 run-command.c:990                 child_exit[1]
pid:1247446 code:0 elapsed:0.020317
11:13:16.401475 run-command.c:735                 child_start[2] git
merge --ff-only FETCH_HEAD
11:13:16.402718 common-main.c:48                  version 2.26.0
11:13:16.402735 common-main.c:49                  start
/home/newren/floss/git/git merge --ff-only FETCH_HEAD
11:13:16.402854 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.402953 git.c:440                         cmd_name merge (pull/merge)
Updating 2ccdb90..2c21563
Fast-forward
11:13:16.404582 run-command.c:735                 child_start[0] git gc --auto
11:13:16.406161 common-main.c:48                  version 2.26.0
11:13:16.406178 common-main.c:49                  start
/home/newren/floss/git/git gc --auto
11:13:16.406301 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.406395 git.c:440                         cmd_name gc (pull/merge/gc)
11:13:16.406663 git.c:674                         exit elapsed:0.000929 code:0
11:13:16.406680 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.000950 code:0
11:13:16.406934 run-command.c:990                 child_exit[0]
pid:1247454 code:0 elapsed:0.002345
 numbers | 1 +
 1 file changed, 1 insertion(+)
11:13:16.407320 git.c:674                         exit elapsed:0.004889 code:0
11:13:16.407336 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.004907 code:0
11:13:16.407556 run-command.c:990                 child_exit[2]
pid:1247453 code:0 elapsed:0.006076
11:13:16.407617 run-command.c:735                 child_start[3] git
rebase --onto 2c21563a2dd61db0a502100ce1da5b6b0ecf8337
2c21563a2dd61db0a502100ce1da5b6b0ecf8337
11:13:16.409886 common-main.c:48                  version 2.26.0
11:13:16.409917 common-main.c:49                  start
/home/newren/floss/git/git rebase --onto
2c21563a2dd61db0a502100ce1da5b6b0ecf8337
2c21563a2dd61db0a502100ce1da5b6b0ecf8337
11:13:16.410166 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.410402 git.c:440                         cmd_name rebase (pull/rebase)
11:13:16.410705 builtin/rebase.c:1669             cmd_mode undefined
Current branch master is up to date.
11:13:16.412385 run-command.c:735                 child_start[0] git gc --auto
11:13:16.413967 common-main.c:48                  version 2.26.0
11:13:16.413983 common-main.c:49                  start
/home/newren/floss/git/git gc --auto
11:13:16.414075 repository.c:130                  worktree
/home/newren/floss/git/testing/pull-rebase-orig-head/clone
11:13:16.414152 git.c:440                         cmd_name gc (pull/rebase/gc)
11:13:16.414363 git.c:674                         exit elapsed:0.000748 code:0
11:13:16.414375 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.000763 code:0
11:13:16.414607 run-command.c:990                 child_exit[0]
pid:1247456 code:0 elapsed:0.002218
11:13:16.414690 git.c:674                         exit elapsed:0.005410 code:0
11:13:16.414720 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.005441 code:0
11:13:16.414925 run-command.c:990                 child_exit[3]
pid:1247455 code:0 elapsed:0.007305
11:13:16.414984 git.c:674                         exit elapsed:0.039375 code:0
11:13:16.415023 trace2/tr2_tgt_normal.c:123       atexit elapsed:0.039415 code:0

So there is no checkout for me; and while it's a useful hint it's not
yet clear to me why you have one.  Anyway, on my side:

$ git log --oneline --reverse; git rev-parse --short ORIG_HEAD
9691d52 initial
1d5a4c1 add another
0da5805 add another
ccea292 add another
100c273 add another
c911eef add another
2ccdb90 add another
2c21563 (HEAD -> master, origin/master, origin/HEAD) add another
2ccdb90


So, I'll repeat the same questions I asked last time, and see if you
will answer them this time:

What's in your .git/config, and in your $HOME/.gitconfig?  (Or maybe
just the output of 'git config --list'?)
What hooks do you have setup in .git/hooks/?

  reply	other threads:[~2020-03-27 18:34 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
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 [this message]
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-BHihQjMc9qugVtVTZVduRxLYUAhf18R5c=3Lb5bcRzjAw@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).