From: Ruslan Yakauleu <ruslan.yakauleu@gmail.com>
To: Kristoffer Haugsbakk <code@khaugsbakk.name>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] merge: --ff-one-only to apply FF if commit is one
Date: Wed, 25 Oct 2023 21:31:03 +0300 [thread overview]
Message-ID: <e38ebf04-cf92-c80b-3432-bf86ecda1054@gmail.com> (raw)
In-Reply-To: <da246287-8530-4680-8fcc-f68f881bc24b@app.fastmail.com>
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. 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.
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)
Then we have a set of branches. Some branches contain only one commit.
For example, we have 4 branches:
- two commits
- one commit
- one commit
- three commits
With --no-ff (only merges) we have next graph with extra merges (E', F')
for branches with one commit
B---C E F G---H---I
/ \ / \ / \ / \
A-------D---E'--F'----------J
With --ff (fast-forward everything) we miss merge branches (D, J) and
it's harder to fast revert some problematic releases properly, because
it's not clear that commits G-H-I - is one release
A---B---C---E---F---G---H---I
Story which --ff-one-only should build without manual control
B---C G---H---I
/ \ / \
A-------D---E---F-----------J
There we have merge commits (D, J) only for complex branches.
Branches E and F fast-forwarded to prevent extra merges.
Sorry if my explanation isn't clear enough
--
Ruslan
next prev parent reply other threads:[~2023-10-25 18:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 8:58 [PATCH] merge: --ff-one-only to apply FF if commit is one Ruslan Yakauleu via GitGitGadget
2023-10-25 16:27 ` Kristoffer Haugsbakk
2023-10-25 18:31 ` Ruslan Yakauleu [this message]
2023-10-25 19:04 ` Kristoffer Haugsbakk
[not found] ` <c37ba153-7239-49ff-b40f-370bc695986e@gmail.com>
2023-10-26 13:40 ` Ruslan Yakauleu
2023-10-30 20:01 ` Taylor Blau
2023-10-31 0:19 ` Junio C Hamano
2023-10-31 5:48 ` Ruslan Yakauleu
2023-10-31 6:07 ` Junio C Hamano
2023-10-31 8:32 ` Kristoffer Haugsbakk
2023-11-01 1:42 ` Junio C Hamano
2023-11-01 6:34 ` Ruslan Yakauleu
2023-11-01 10:09 ` Kristoffer Haugsbakk
2023-11-01 23:05 ` Junio C Hamano
2023-10-31 6:01 ` Ruslan Yakauleu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e38ebf04-cf92-c80b-3432-bf86ecda1054@gmail.com \
--to=ruslan.yakauleu@gmail.com \
--cc=code@khaugsbakk.name \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).