git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ruslan Yakauleu <ruslan.yakauleu@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] merge: --ff-one-only to apply FF if commit is one
Date: Tue, 31 Oct 2023 08:48:40 +0300	[thread overview]
Message-ID: <9f584927-7506-421e-a363-953eebb0ef90@gmail.com> (raw)
In-Reply-To: <xmqq1qdb8wzk.fsf@gitster.g>

Hi Junio,

Command of developers can decide which policy use and why.
If a team decides to avoid extra merges - why not?

 > a single commit could be a large and involved
Create one non-reviewable commit or losing feature scope is much worse
practice

For me `git log --graph` is the most representative form to describe
what's going on with a project and I prefer not to complicate it. But
it must show changes properly.

--ff-one-only is handy for keeping the appearance of a linear commit
history and makes merge commit messages (from other branches) more
meaningful because they actually do represent some branch being folded
into the master.

As an example, merge commit for one commit is overkill and doesn't bring
new meaning. All one-commit meanings described in the commit message. In
this case extra branching (extra merges) just adds confusion. Plenty of
extra merges turns into merge hell when you have countless merge messages,
but you can't get sense what's going on with project.

People use rebase and fast-forward to make commit history more linear,
avoid merge hell and keep the repository tree clear - it's fine.
But it's a big mistake to merge complex features as one non-reviewable
commit. And even worse to make all history absolutely linear when you
can't find where a complex feature starts and where it finishes. If it
wasn't combined in a special branch, it looks in the main branch like a
set of different, not connected features.
In the case of problems with absolutely linear history, you don't know
how many commits you have to revert.
In case when one commit (merge commit for complex features) brings all
changes into the main branch - you know that you can revert feature or,
for complex changes, even part of a specific feature. You can revert just
A/B tests for example, if you don't need them anymore but keep complex
features - this case makes squash even more useless.
You can try to use branch names to find where each branch merged into the
main branch, but it's not as descriptive as a graph and every so often you
can lose branch names. As an example, GitLab has an option "Delete source
branch when merge request accepted" and many teams use it.

--
Ruslan


  reply	other threads:[~2023-10-31  5:48 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
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 [this message]
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=9f584927-7506-421e-a363-953eebb0ef90@gmail.com \
    --to=ruslan.yakauleu@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).