git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Norbert Kiesel <nkiesel@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: "git rebase" behavior change in 2.26.0
Date: Wed, 25 Mar 2020 01:39:08 -0400	[thread overview]
Message-ID: <20200325053908.GC651138@coredump.intra.peff.net> (raw)
In-Reply-To: <CAM+g_Nuu2jGuNwUMS3j8=EjOrthYzfVTrUzOxQJ=aYcoBAL3Tg@mail.gmail.com>

On Tue, Mar 24, 2020 at 08:38:04PM -0700, Norbert Kiesel wrote:

> I track an upstream repo with "pull.rebase = true" where I do a `git
> pull` followed by a `git log -p ORIG_HEAD..` for a branch to see
> changes since the last "pull".  I normally do not commit to this
> branch and thus this normally is a "fast-forward" merge.
> 
> Starting with 2.26 this no longer works because ORIG_HEAD is always
> set to HEAD after my `git pull`.
> 
> I track other prances from the same repo where I do local changes and
> then want the `git pull --rebase` and I thus do not want to
> give up on the `pull.rebase = true` configuration.

I can imagine this is related to the switch to the "merge" backend for
git-pull, which may be more eager to overwrite ORIG_HEAD. Perhaps try:

  git -c rebase.backend=apply pull

and see if that behaves differently.

I tried to reproduce what you're seeing, but my recipe doesn't seem to
show any difference between the two versions:

-- >8 --
#!/bin/sh

rm -rf repo

git init -q repo
cd repo
echo content >base && git add base && git commit -q -m base
git clone -q . dst
echo content >new && git add new && git commit -q -m new

cd dst
git rev-parse HEAD >.git/ORIG_HEAD
echo before: $(git log -1 --oneline ORIG_HEAD)
git -c pull.rebase=true pull -q ..
echo after: $(git log -1 --oneline ORIG_HEAD)
-- 8< --

We don't seem to touch ORIG_HEAD in either case. But maybe a more
complex set of pulled commits would trigger it?

-Peff

  reply	other threads:[~2020-03-25  5:39 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 [this message]
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
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=20200325053908.GC651138@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=nkiesel@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).