diff mbox series

[v2,5/5] t9902: avoid using the branch name `master`

Message ID c2c1238b5d9dde684d100fa99437a813140cd615.1600725687.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Inclusive naming, part II | expand

Commit Message

Jean-Noël Avila via GitGitGadget Sept. 21, 2020, 10:01 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

The completion tests used that name unnecessarily, and it is a
non-inclusive term, so let's avoid using it here.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9902-completion.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Junio C Hamano Sept. 21, 2020, 10:35 p.m. UTC | #1
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> The completion tests used that name unnecessarily, and it is a
> non-inclusive term, so let's avoid using it here.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/t9902-completion.sh | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Here, the tests and the tested feature do not work any differently
on the first-made branch, so the same "just use topic, not the
first-made branch name" used in 3/5 applies here.

Luckily, unlike 3/5 and 4/5, this step does not involve names
derived from the name of the first-made branch name, so 'main'
may be OK as-is, but for consistency across the patches, we may
want to consider using 'topic' here as well.  I dunno.
Johannes Schindelin Sept. 26, 2020, 4:25 a.m. UTC | #2
Hi Junio,

On Mon, 21 Sep 2020, Junio C Hamano wrote:

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > The completion tests used that name unnecessarily, and it is a
> > non-inclusive term, so let's avoid using it here.
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> >  t/t9902-completion.sh | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
>
> Here, the tests and the tested feature do not work any differently
> on the first-made branch, so the same "just use topic, not the
> first-made branch name" used in 3/5 applies here.
>
> Luckily, unlike 3/5 and 4/5, this step does not involve names
> derived from the name of the first-made branch name, so 'main'
> may be OK as-is, but for consistency across the patches, we may
> want to consider using 'topic' here as well.  I dunno.

I am afraid that three test cases that are touched by this test rely on
the fact that the first two letters (or just the first letter) are
ambiguous when tab-completing branch names: `ma` could complete to either
`master` or `maint`.

To clarify, I added a paragraph to the commit message.

Ciao,
Dscho
diff mbox series

Patch

diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
index 8425b9a531..7b7bc6e4bd 100755
--- a/t/t9902-completion.sh
+++ b/t/t9902-completion.sh
@@ -542,37 +542,37 @@  test_expect_success '__gitcomp - doesnt fail because of invalid variable name' '
 '
 
 read -r -d "" refs <<-\EOF
+main
 maint
-master
 next
 seen
 EOF
 
 test_expect_success '__gitcomp_nl - trailing space' '
 	test_gitcomp_nl "m" "$refs" <<-EOF
+	main Z
 	maint Z
-	master Z
 	EOF
 '
 
 test_expect_success '__gitcomp_nl - prefix' '
 	test_gitcomp_nl "--fixup=m" "$refs" "--fixup=" "m" <<-EOF
+	--fixup=main Z
 	--fixup=maint Z
-	--fixup=master Z
 	EOF
 '
 
 test_expect_success '__gitcomp_nl - suffix' '
 	test_gitcomp_nl "branch.ma" "$refs" "branch." "ma" "." <<-\EOF
+	branch.main.Z
 	branch.maint.Z
-	branch.master.Z
 	EOF
 '
 
 test_expect_success '__gitcomp_nl - no suffix' '
 	test_gitcomp_nl "ma" "$refs" "" "ma" "" <<-\EOF
+	mainZ
 	maintZ
-	masterZ
 	EOF
 '