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

Re: `pull --rebase --autostash` fails when fast forward in dirty repo

From
Jeff King <peff@peff.net>
Date
May 25, 2017, 18:04 UTC
Message-ID
<20170525180407.ni2oed5wk3qsd2ch@sigill.intra.peff.net>
In-Reply-To
<xmqqa863jiyf.fsf@gitster.mtv.corp.google.com>
On Wed, May 24, 2017 at 07:40:08AM +0900, Junio C Hamano wrote:
Show 5 quoted lines
> > But I notice on the run_merge() code path that we do still invoke
> > git-merge.
> 
> ... wouldn't that what we want even when the merge happens to be a
> fast-forward one?  I am not sure what you meant by this, but...

I just meant that if the point of the optimization was to avoid invoking git-rebase (because it's slow), then we're still not optimizing out a process. It only helps at all because "rebase" (being a shell script) may be slower to start and realize it's a fast-forward than "merge".

But once that is no longer true of git-rebase, then there is no purpose to the optimization.

Show 6 quoted lines
> > And rebase has been getting faster as it is moved to C code
> > itself. So is this optimization even worth doing anymore?
> 
> ...that might be something worth thinking about---my gut feeling
> tells me something but we should go by a measurement, not by gut
> feeling of a random somebody.

Yeah, I'd agree. I had the impression the original change was motivated by gut feeling.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 4 of 8 in “`pull --rebase --autostash` fails when fast forward in dirty repo”
  1. Tyler BrazierMay 21, 2017
  2. Jeff KingMay 23, 2017
  3. Junio C HamanoMay 23, 2017
  4. Jeff KingMay 25, 2017
  5. Jeff KingMay 25, 2017
  6. Junio C HamanoMay 25, 2017
  7. Tyler BrazierMay 26, 2017
  8. Junio C HamanoMay 26, 2017

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.