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

Re: "git rebase" behavior change in 2.26.0

From
Jeff King <peff@peff.net>
Date
Mar 26, 2020, 07:28 UTC
Message-ID
<20200326072840.GA2198456@coredump.intra.peff.net>
In-Reply-To
<CABPp-BFMN+pnOjEe2tZZJp3_Noojn5j1ip3dh8Xz9hCZoKJbxw@mail.gmail.com>
On Wed, Mar 25, 2020 at 11:32:31PM -0700, Elijah Newren wrote:
Show 20 quoted lines
> > Say, WAT?!?  This attempted to run both a merge and a rebase?  That
> > appears to be yet another bug.
> 
> From git-pull.c:
> 
>     ...
>         if (is_descendant_of(merge_head, list)) {
>             /* we can fast-forward this without invoking rebase */
>             opt_ff = "--ff-only";
>             ret = run_merge();
>         }
>     }
>     ret = run_rebase(&curr_head, merge_heads.oid, &rebase_fork_point);
> 
> Perhaps that comment should read:
> 
>    /* we can fast-forward this using merge and avoid rebase...but then
> run rebase afterward anyway! */
> 
> Whoops.  Perhaps fixing this is a good micro-project candidate?  Too small?

Good find. :) Looks like this is due to a6d7eb2c7a (pull: optionally rebase submodules (remote submodule changes only), 2017-06-23) which changed the early return to "ret =".

I think it would be an OK size for a micro-project, but it seems like a bug which we may want fixed sooner rather than waiting for somebody to pick it up from the micro-project pile.

Or perhaps not. AFAICT this has been there for 2+ years without anybody noticing.

-Peff
Previous: Elijah NewrenNext: Norbert Kiesel
Message 8 of 11 in “"git rebase" behavior change in 2.26.0”
  1. Norbert KieselMar 25, 2020
  2. Jeff KingMar 25, 2020
  3. Elijah NewrenMar 25, 2020
  4. Norbert KieselMar 26, 2020
  5. Norbert KieselMar 26, 2020
  6. Elijah NewrenMar 26, 2020
  7. Elijah NewrenMar 26, 2020
  8. Jeff KingMar 26, 2020
  9. Norbert KieselMar 27, 2020
  10. Elijah NewrenMar 27, 2020
  11. Elijah NewrenMar 27, 2020

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.