git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 01/10] fmt-merge-msg: also suppress "into main" by default
Date: Wed, 21 Oct 2020 15:12:22 -0700	[thread overview]
Message-ID: <xmqq7drj5iux.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <cf950c6f6a48f9a6ad55ac027afbc0640f9a535d.1603135902.git.gitgitgadget@gmail.com> (Johannes Schindelin via GitGitGadget's message of "Mon, 19 Oct 2020 19:31:32 +0000")

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> In preparation for changing the default branch name to `main`, let's
> skip the suffix "into main" in merge commit messages.

Hmph, we reversed the course from "no suppression" to "suppress
master as we've always done" because otherwise we'd add _more_
instances of 6-letter string 'master' to our codebase, and that
was to be avoided.  There is no such "let's avoid saying main"
desire, is there?

I can see why a series about updating tests would want a change like
this (i.e. to avoid patches that have to add 'into main' everywhere
to the expected output), but as to the desired behaviour of the
default behaviour of "git merge" command, I am not sure this goes
into the right direction.  After all, there are those (including me)
who find the idea of having one single thing (in this case a branch)
that is special among others is objectionable in itself, not what
word (e.g. 'master') is used to call that single "special" thing.

Having said all that, let me keep my suggested change to the very
minimum.  Let's end the proposed log message with

    ..., let's skip the suffix "into main" in merge commit messages,
    the same way that "into master" has been skipped by default.

That would justify why we are still special casing the new word.

Thanks.

> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  fmt-merge-msg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
> index bd22e1ea88..9a664a4a58 100644
> --- a/fmt-merge-msg.c
> +++ b/fmt-merge-msg.c
> @@ -626,8 +626,10 @@ int fmt_merge_msg(struct strbuf *in, struct strbuf *out,
>  	void *current_branch_to_free;
>  	struct merge_parents merge_parents;
>  
> -	if (!suppress_dest_pattern_seen)
> +	if (!suppress_dest_pattern_seen) {
> +		string_list_append(&suppress_dest_patterns, "main");
>  		string_list_append(&suppress_dest_patterns, "master");
> +	}
>  
>  	memset(&merge_parents, 0, sizeof(merge_parents));

  reply	other threads:[~2020-10-21 22:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-19 19:31 [PATCH 00/10] Prepare for changing the default branch name main (last manual part) Johannes Schindelin via GitGitGadget
2020-10-19 19:31 ` [PATCH 01/10] fmt-merge-msg: also suppress "into main" by default Johannes Schindelin via GitGitGadget
2020-10-21 22:12   ` Junio C Hamano [this message]
2020-10-22 12:28     ` Johannes Schindelin
2020-10-19 19:31 ` [PATCH 02/10] t9801: use `--` in preparation for default branch rename Johannes Schindelin via GitGitGadget
2020-10-21 22:19   ` Junio C Hamano
2020-10-19 19:31 ` [PATCH 03/10] tests: start moving to a different default main branch name Johannes Schindelin via GitGitGadget
2020-10-21 22:22   ` Junio C Hamano
2020-10-19 19:31 ` [PATCH 04/10] t4013: prepare for the new default branch name "main" Johannes Schindelin via GitGitGadget
2020-10-21 22:23   ` Junio C Hamano
2020-10-22 12:27     ` Johannes Schindelin
2020-10-19 19:31 ` [PATCH 05/10] t6200: adjust suppression pattern to also match "main" Johannes Schindelin via GitGitGadget
2020-10-21 22:27   ` Junio C Hamano
2020-10-22 13:01     ` Johannes Schindelin
2020-10-19 19:31 ` [PATCH 06/10] t5703: adjust a test case for the upcoming default branch name Johannes Schindelin via GitGitGadget
2020-10-21 22:34   ` Junio C Hamano
2020-10-19 19:31 ` [PATCH 07/10] t3200: prepare for `main` being shorter than `master` Johannes Schindelin via GitGitGadget
2020-10-21 22:39   ` Junio C Hamano
2020-10-22 13:08     ` Johannes Schindelin
2020-10-19 19:31 ` [PATCH 08/10] t9902: prepare a test for the upcoming default branch name Johannes Schindelin via GitGitGadget
2020-10-19 19:31 ` [PATCH 09/10] tests: prepare aligned mentions of the " Johannes Schindelin via GitGitGadget
2020-10-19 19:31 ` [PATCH 10/10] t1400: prepare for `main` being " Johannes Schindelin via GitGitGadget
2020-10-21 21:59 ` [PATCH 00/10] Prepare for changing the default branch name main (last manual part) Junio C Hamano
2020-10-22 13:11   ` Johannes Schindelin
2020-10-23 13:59 ` [PATCH v2 0/9] " Johannes Schindelin via GitGitGadget
2020-10-23 13:59   ` [PATCH v2 1/9] fmt-merge-msg: also suppress "into main" by default Johannes Schindelin via GitGitGadget
2020-10-23 13:59   ` [PATCH v2 2/9] t9801: use `--` in preparation for default branch rename Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 3/9] tests: start moving to a different default main branch name Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 4/9] t6200: adjust suppression pattern to also match "main" Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 5/9] t5703: adjust a test case for the upcoming default branch name Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 6/9] t3200: prepare for `main` being shorter than `master` Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 7/9] t9902: prepare a test for the upcoming default branch name Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 8/9] tests: prepare aligned mentions of the " Johannes Schindelin via GitGitGadget
2020-10-23 14:00   ` [PATCH v2 9/9] t1400: prepare for `main` being " Johannes Schindelin via GitGitGadget
2020-10-23 15:59   ` [PATCH v2 0/9] Prepare for changing the default branch name main (last manual part) 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

  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=xmqq7drj5iux.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    /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).