All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, "Alex Henrie" <alexhenrie24@gmail.com>,
	"Heba Waly" <heba.waly@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
	"Matheus Tavares" <matheus.tavb@gmail.com>
Subject: Re: [PATCH 1/2] advice: add diverging advice for novices
Date: Wed, 08 Mar 2023 09:17:42 -0800	[thread overview]
Message-ID: <xmqqcz5jupqh.fsf@gitster.g> (raw)
In-Reply-To: 20230308024834.1562386-2-felipe.contreras@gmail.com

Felipe Contreras <felipe.contreras@gmail.com> writes:

> The user might not necessarily know why ff only was configured, maybe an
> admin did it, or the installer (Git for Windows), or perhaps they just
> followed some online advice.
>
> This can happen not only on pull.ff=only, but merge.ff=only too.
>
> Even worse if the user has configured pull.rebase=false and
> merge.ff=only, because in those cases a diverging merge will constantly
> keep failing. There's no trivial way to get out of this other than
> `git merge --no-ff`.

A good description.  Without this explained, the instruction to run
"git merge" with "--no-ff" in the text would have been puzzling to
readers.  At least I was initially puzzled as I read the patch text
before the proposed log message.

>  void NORETURN die_ff_impossible(void)
>  {
> +	advise(_("Diverging branches can't be fast-forwarded, you need to either:\n"
> +		"\n"
> +		"\tgit merge --no-ff\n"
> +		"\n"
> +		"or:\n"
> +		"\n"
> +		"\tgit rebase\n"));
>  	die(_("Not possible to fast-forward, aborting."));
>  }

  reply	other threads:[~2023-03-08 17:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  2:48 [PATCH 0/2] advice: add diverging advice Felipe Contreras
2023-03-08  2:48 ` [PATCH 1/2] advice: add diverging advice for novices Felipe Contreras
2023-03-08 17:17   ` Junio C Hamano [this message]
2023-03-08  2:48 ` [PATCH 2/2] advice: make diverging advice configurable Felipe Contreras
2023-03-08 16:03 ` [PATCH 0/2] advice: add diverging advice Taylor Blau
2023-03-08 17:17   ` Junio C Hamano
2023-03-09 23:44   ` Junio C Hamano

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=xmqqcz5jupqh.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=alexhenrie24@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=heba.waly@gmail.com \
    --cc=matheus.tavb@gmail.com \
    --cc=pclouds@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.