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

Re: [PATCH] merge: --ff-one-only to apply FF if commit is one

From
Kristoffer Haugsbakk <code@khaugsbakk.name>
Date
Oct 25, 2023, 19:04 UTC
Message-ID
<840358e1-05b4-4730-a89d-1efae568d04d@app.fastmail.com>
In-Reply-To
<e38ebf04-cf92-c80b-3432-bf86ecda1054@gmail.com>
On Wed, Oct 25, 2023, at 20:31, Ruslan Yakauleu wrote:
Show 5 quoted lines
> Hi
>
> If we use squash we will lose some context and occasionally, we need
> multiple small features combined into one big release. We would rather
> not mix it into one monolithic non-readable blob.

The only context you lose is the point where your branch started, if that matters. (Later in the email you say that you rebase before you merge so apparently it does not matter to you.)

To squash one single commit doesn’t make a “monolithic” commit—it is exactly as monolithic as the commit you started with.

> For us, sometimes it is better to rebase something to make history more
> accurate than squash everything into one commit. We can use squash only
> for one story.
No, squash one single commit. Not multiple.
> Anyway, squash is a different feature.  Same as rebase (of course we're
> doing the rebase before merge to clarify history and to make some
> regression tests)

Squash and rebase are functionally identical in this case. And since you rebase before merge anyway it is identical to the flow of

1. Rebase before merge
2. Merge with your new option
Except you don’t have to split it into two steps.
Previous: Ruslan YakauleuNext: Taylor Blau
Message 4 of 15 in “merge: --ff-one-only to apply FF if commit is one”
  1. merge: --ff-one-only to apply FF if commit is oneRuslan Yakauleu via GitGitGadget, Oct 25, 2023
  2. Kristoffer HaugsbakkOct 25, 2023
  3. Ruslan YakauleuOct 25, 2023
  4. Kristoffer HaugsbakkOct 25, 2023
  5. Taylor BlauOct 30, 2023
  6. Junio C HamanoOct 31, 2023
  7. Ruslan YakauleuOct 31, 2023
  8. Junio C HamanoOct 31, 2023
  9. Kristoffer HaugsbakkOct 31, 2023
  10. Junio C HamanoNov 1, 2023
  11. Ruslan YakauleuNov 1, 2023
  12. Kristoffer HaugsbakkNov 1, 2023
  13. Junio C HamanoNov 1, 2023
  14. Ruslan YakauleuOct 31, 2023
  15. Ruslan YakauleuOct 26, 2023

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.