git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH 2/2] tests: avoid using the branch name `main`
Date: Mon, 5 Oct 2020 02:59:30 -0700	[thread overview]
Message-ID: <20201005095930.GO1166820@google.com> (raw)
In-Reply-To: <6045ceb938836355b7d43bc2088ca2504b05dde4.1601888196.git.gitgitgadget@gmail.com>

Johannes Schindelin wrote:

> In the near future, we want to change Git's default branch name to
> `main`. In preparation for that, stop using it as a branch name in the
> test suite. Replace that branch name by `primary`.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/t6012-rev-list-simplify.sh |  8 ++++----
>  t/t6400-merge-df.sh          |  8 ++++----
>  t/t6409-merge-subtree.sh     | 12 ++++++------
>  t/t6430-merge-recursive.sh   |  4 ++--
>  4 files changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/t/t6012-rev-list-simplify.sh b/t/t6012-rev-list-simplify.sh
> index b6fa43ace0..f1296c29e6 100755
> --- a/t/t6012-rev-list-simplify.sh
> +++ b/t/t6012-rev-list-simplify.sh
> @@ -171,7 +171,7 @@ test_expect_success '--full-diff is not affected by --parents' '
>  test_expect_success 'rebuild repo' '
>  	rm -rf .git * &&
>  	git init &&
> -	git switch -c main &&
> +	git switch -c primary &&

Is there a secondary corresponding to this primary?

I guess the idea is that this is the trunk that other branches branch
from?  Looking at the history, it seems that this test was added
relatively recently and it may have had the upcoming branch name change
in mind (or in other words if it were an older test it might be expected
to use "master").

That suggests an alternative that is agnostic to init.defaultBranch:
what if this uses "git switch -C main"?

Thanks,
Jonathan

  reply	other threads:[~2020-10-05  9:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05  8:56 [PATCH 0/2] Avoid main as branch name in the test suite Johannes Schindelin via GitGitGadget
2020-10-05  8:56 ` [PATCH 1/2] t1415: avoid using `main` as ref name Johannes Schindelin via GitGitGadget
2020-10-05  9:54   ` Jonathan Nieder
2020-10-08  7:56     ` Johannes Schindelin
2020-10-05  8:56 ` [PATCH 2/2] tests: avoid using the branch name `main` Johannes Schindelin via GitGitGadget
2020-10-05  9:59   ` Jonathan Nieder [this message]
2020-10-08  8:05     ` Johannes Schindelin
2020-10-08 18:15       ` Derrick Stolee
2020-10-08 10:13 ` [PATCH v2 0/2] Avoid main as branch name in the test suite Johannes Schindelin via GitGitGadget
2020-10-08 10:13   ` [PATCH v2 1/2] t1415: avoid using `main` as ref name Johannes Schindelin via GitGitGadget
2020-10-08 10:13   ` [PATCH v2 2/2] tests: avoid using the branch name `main` Johannes Schindelin via GitGitGadget

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=20201005095930.GO1166820@google.com \
    --to=jrnieder@gmail.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.
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).