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

Re: [RFC/PATCH 1/2] rebuash - squash/rebase in a single step

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 2, 2019, 17:20 UTC
Message-ID
<xmqqr2784alt.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<2cece7ff-49af-0cae-7cb8-7cc1821be1ca@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 18 quoted lines
> On 7/1/2019 2:35 PM, Junio C Hamano wrote:
>> Jeff King <peff@peff.net> writes:
>> 
>>>> First, we create a (temporary) merge commit of both branches (M3)
>>>>
>>>> ------------
>>>> 	R1---R2---R3---R4---R5---R6---R7---M3
>>>> 	 \         \              \       /
>>>> 	  F1---F2---M1---F3---F4---M2---F5
>>>> ------------
>>>>
> ...
>> If M3 merge is always easier to manage than incremental stepwise
>> rebase of the topic, then doing the "git merge --reverse-squash"
>> would be a saner interface and also conceptually simpler.
>
> I agree that this would be a better way to expose this behavior,
> and likely the implementation could be very clean.

What I was sort-of hoping to get comments on was actually something else.

Would there be cases where the merge M3 gets unmanageably complex even if rebasing the feature commits one by one is relatively simple (and how often would that happen)? "merge --squash" would not work well (and extending the command to merge in a different direction would not help) in such a situation, but "rebase -i" would work much better (and "imerge" would, too).

Previous: Derrick StoleeNext: Johannes Sixt
Message 12 of 13 in “rebuash - squash/rebase in a single step”
  1. 1/2 rebuash - squash/rebase in a single stepEdmundo Carmona Antoranz, Jun 30, 2019
  2. 2/2 rebuash - support for statusEdmundo Carmona Antoranz, Jun 30, 2019
  3. Edmundo Carmona AntoranzJun 30, 2019
  4. Jeff KingJun 30, 2019
  5. Edmundo Carmona AntoranzJun 30, 2019
  6. Jeff KingJun 30, 2019
  7. Edmundo Carmona AntoranzJul 1, 2019
  8. Junio C HamanoJul 1, 2019
  9. Edmundo Carmona AntoranzJul 1, 2019
  10. Junio C HamanoJul 1, 2019
  11. Derrick StoleeJul 2, 2019
  12. Junio C HamanoJul 2, 2019
  13. Johannes SixtJul 2, 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.