From: usbuser@mailbox.org
To: Elijah Newren <newren@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: Unexpected or wrong ff, no-ff and ff-only behaviour
Date: Tue, 9 Jul 2019 19:00:33 +0200 (CEST) [thread overview]
Message-ID: <275487563.12198.1562691633735@office.mailbox.org> (raw)
In-Reply-To: <CABPp-BHpkcOSkTrNDPGWRgSJgbqkc0PRqMqmesg7tQdS5TfMDA@mail.gmail.com>
> On 09 July 2019 at 18:35 Elijah Newren <newren@gmail.com> wrote:
>
>
> Hi Roland,
>
> On Tue, Jul 9, 2019 at 9:17 AM Roland Jäger <eyenseo@mailbox.org> wrote:
> >
> > Thanks for answering Junio.
> >
> > I get what git does. But I believe that either the documentation ist wrong/ambiguous or --no-ff and --ff-only should be able to be combined and either should be fixed - preferably the later. What I want to say to git is "I never accept a real merge; please make a merge commit, even if it is redundant/empty". And I believe that github and gitlab allow to configure something like that.
>
> Please don't top-post on this list.
>
> I agree, the documentation is wrong or misleading and there is a
> wording change we could make to improve it. But, in particular,
> --no-ff and -ff-only are completely incompatible. A fast forward
> implies no commits of any kind are created, while --no-ff explicitly
> requires one to be created. More on that below...
>
> > My manpage tells me the following:
> >
> > --ff When the merge resolves as a fast-forward, only update the branch pointer, without creating a merge commit. This is the default behavior.
> > => Allow either
>
> Yes.
>
> > --no-ff Create a merge commit even when the merge resolves as a fast-forward. This is the default behaviour when merging an annotated (and possibly signed) tag that is not stored in its natural place in refs/tags/ hierarchy.
> > => Always create a commit, even when FF
>
> Not quite; I'd instead say:
>
> => Always create a merge commit, even if FF is instead possible.
>
> In particular, FF means there is no commit creation. I agree the
> documentation needs correction here, it should be:
>
> "--no-ff: Create a merge commit even when the merge could instead
> resolve as a fast-forward..."
>
> Would you like to try your hand at submitting a patch with this change?
>
> > --ff-only Refuse to merge and exit with a non-zero status unless the current HEAD is already up to date or the merge can be resolved as a fast-forward.
> > => Fail if FF is not possible
>
> Yes.
>
>
> Hope that helps,
> Elijah
I hope this is not-top-posting? I'm new to this and know nothing apparently.
If I were to write a patch then I would very much prefer to implement the behaviour that I expected and want to exist - either by a new flag and fixed wording, or just fixed behaviour. I guess the latter is a no go. Could you point me in the right direction where I would need to start to add such a flag?
Additionally I would also want to change the wording for --ff-only, as it currently reads as if it only performs a check (which would lead to the expected behaviour) but does more than that, as it prevents "real merges" altogether.
Thank you for your time,
Roland
next prev parent reply other threads:[~2019-07-09 17:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 9:42 Unexpected or wrong ff, no-ff and ff-only behaviour usbuser
2019-07-09 14:51 ` Junio C Hamano
2019-07-09 16:15 ` Roland Jäger
2019-07-09 16:35 ` Elijah Newren
2019-07-09 17:00 ` usbuser [this message]
2019-07-09 20:33 ` Elijah Newren
2019-07-09 20:51 ` Bryan Turner
2019-07-10 7:49 ` usbuser
2019-07-10 16:34 ` Junio C Hamano
2019-07-11 5:13 ` Sergey Organov
2019-07-11 17:03 ` Junio C Hamano
2019-07-12 13:50 ` Sergey Organov
2019-07-12 16:24 ` Elijah Newren
2019-07-15 12:08 ` Sergey Organov
2019-07-12 18:33 ` Junio C Hamano
2019-07-15 12:47 ` Sergey Organov
2019-07-15 16:57 ` Junio C Hamano
2019-07-19 11:00 ` Sergey Organov
2019-07-11 15:46 ` brian m. carlson
2019-07-10 14:36 ` Sergey Organov
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=275487563.12198.1562691633735@office.mailbox.org \
--to=usbuser@mailbox.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).