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
Nov 1, 2023, 10:09 UTC
Message-ID
<a457e24c-3375-49c6-8cf7-d2dd945827fe@app.fastmail.com>
In-Reply-To
<xmqqa5ryxn8i.fsf@gitster.g>
On Wed, Nov 1, 2023, at 02:42, Junio C Hamano wrote:
Show 9 quoted lines
> Strictly speaking, the log message on a merge commit serves two
> purposes, one is to summarize commit(s) on the side branch that gets
> merged with the merge, and as you said above, it is not needed when
> merging a topic with just one commit.  But the other is to justify
> why the topic suits the objective of the line of history (which is
> needed even when merging a single commit topic---imagine a commit
> that is not incorrect per-se.  It may or may not be suitable for the
> maintenance track, and a merge commit of such a commit into the
> track can explain if/how the commit being merged is maint-worthy).

Yes. If you have multiple release/maintenance branches which you need to apply something to then you can’t use this .

Show 13 quoted lines
>> The point at which you use such a merge feature is when you are already
>> happy with the pull request (or patch series or whatever else). And then
>> you (according to this strategy) prefer to avoid merge commits for
>> single-commit pull requests.
>
> But that argues against the "--ff-one-only" option, doesn't it?
>
> If you looked at the side branch before you decide to merge it, you
> know if the topic has only one commit (in which case you decide not
> to use "--no-ff"), or if the topic consists of multiple commits (in
> which case you decide to use "--no-ff").  And the only effect to
> have the "--ff-one-only" option is to allow you *not* to look at
> what is on the side branch.

No. The only effect is that you streamline the process of “decide not to use `--no-ff`” since the strategy does it for you.

It would act like a small `git my-merge` alias. That is all.
-- 
Kristoffer Haugsbakk
Previous: Ruslan YakauleuNext: Junio C Hamano
Message 12 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.