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

BUG: 2.11-era rebase regression when @{upstream} is implicitly used

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Feb 14, 2019, 13:23 UTC
Message-ID
<877ee2jyh3.fsf@evledraar.gmail.com>
This is not a 2.21 release issue, and pre-dates the built-in rebase.

When you clone any repository, e.g. git.git, and add one commit on top of the cloned branch, then run "git rebase" you'll get e.g.:

    $ git rebase
    First, rewinding head to replay your work on top of it...
    Applying: foo

Before 4f21454b55 ("merge-base: handle --fork-point without reflog", 2016-10-12) you'd get:

    $ git rebase
    Current branch master is up to date.

The results are not the same for "git rebase @{u}" or "git rebase $(git rev-parse @{u})":

    $ git rev-parse HEAD; ~/g/git/git --exec-path=/home/avar/g/git rebase; git rev-parse HEAD; ~/g/git/git --exec-path=/home/avar/g/git rebase @{u}; git rev-parse HEAD; ~/g/git/git --exec-path=/home/avar/g/git rebase $(git rev-parse @{u}); git rev-parse HEAD
    d0a1e49341cac6db3226eb0f76ec4a5912f18af8
    First, rewinding head to replay your work on top of it...
    Applying: foo
    3a9261d6e34d9f6d00c8e8411d7ddd8cffa02d97
    Current branch master is up to date.
    3a9261d6e34d9f6d00c8e8411d7ddd8cffa02d97
    Current branch master is up to date.
    3a9261d6e34d9f6d00c8e8411d7ddd8cffa02d97

With 4f21454b55^ checked-out the SHA-1 always stays the same, i.e. no work is done for the same command:

    69bd93d9aa438c6d903b8e62c3bf1c6c5ab8ec0b
    Current branch master is up to date.
    69bd93d9aa438c6d903b8e62c3bf1c6c5ab8ec0b
    Current branch master is up to date.
    69bd93d9aa438c6d903b8e62c3bf1c6c5ab8ec0b
    Current branch master is up to date.
    69bd93d9aa438c6d903b8e62c3bf1c6c5ab8ec0b
Next: Jeff King
Message 1 of 12 in “BUG: 2.11-era rebase regression when @{upstream} is implicitly used”
  1. Ævar Arnfjörð BjarmasonFeb 14, 2019
  2. Jeff KingFeb 21, 2019
  3. Ævar Arnfjörð BjarmasonFeb 21, 2019
  4. Jeff KingFeb 21, 2019
  5. 0/2 rebase: fix 2.11.0-era --fork-point regressionÆvar Arnfjörð Bjarmason, Feb 21, 2019
  6. 1/2 rebase tests: test linear branch topologyÆvar Arnfjörð Bjarmason, Feb 21, 2019
  7. Jeff KingFeb 22, 2019
  8. Junio C HamanoFeb 22, 2019
  9. 2/2 rebase: don't rebase linear topology with --fork-pointÆvar Arnfjörð Bjarmason, Feb 21, 2019
  10. Jeff KingFeb 22, 2019
  11. Ævar Arnfjörð BjarmasonFeb 22, 2019
  12. Jeff KingFeb 24, 2019

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.