git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Jeff King <peff@peff.net>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH v2 0/5] Inclusive naming, part II
Date: Mon, 21 Sep 2020 22:01:21 +0000	[thread overview]
Message-ID: <pull.734.v2.git.1600725687.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.734.git.1600279853.gitgitgadget@gmail.com>

This patch series represents the logical next step on the journey begun with
introducing init.defaultBranch: in these patches, we avoid a couple
unnecessary mentions of the branch name "master".

This patch series does not try to change the default branch name, although I
have that patch series ready to go. You can see the overall idea here: 
https://github.com/gitgitgadget/git/pull/655. Concretely, I plan on
submitting three more patch series after this one:

 1. a relatively small patch series to avoid using the branch name main in
    the test suite. This is necessary because my plan is to change the
    default branch name to that name, therefore it cannot be used as the
    name of a topic branch any longer.
 2. a relatively large patch series (currently consisting of 18 patches) to
    change the default branch name to main. Most of the patches provide
    non-trivial (read: non-scriptable) adjustments to the test suite in an
    incremental fashion, with a big patch toward the end that reflects a
    fully-automated search-and-replace of all the trivial cases.
 3. a very small patch series with fall-out patches that are not necessary
    to pass the test suite, but are still required to complete the rename
    (adjusted code comment, file rename).

(Note: I am still debating whether I should move one or two patches from the
second to the third patch series)

Changes since v1:

 * Instead of using the name primary for the adjustments to 
   t/test-terminal.perl, we follow Python's lead (which uses the
   parent/child nomenclature).
 * The changes to t3200 no longer use variations of the name main as branch
   names; Instead, the renamed branches are independent from any current or
   future default branch name.

Johannes Schindelin (5):
  fast-export: avoid using unnecessary language in a code comment
  t/test-terminal: avoid non-inclusive language
  t3200: avoid variations of the `master` branch name
  tests: avoid variations of the `master` branch name
  t9902: avoid using the branch name `master`

 builtin/fast-export.c        |  2 +-
 t/t3200-branch.sh            | 34 ++++++++++++++---------------
 t/t3427-rebase-subtree.sh    | 42 ++++++++++++++++++------------------
 t/t4150-am.sh                |  8 +++----
 t/t5515-fetch-merge-logic.sh |  6 +++---
 t/t5523-push-upstream.sh     | 20 ++++++++---------
 t/t6018-rev-list-glob.sh     |  6 +++---
 t/t6040-tracking-info.sh     | 20 ++++++++---------
 t/t6409-merge-subtree.sh     | 14 ++++++------
 t/t9902-completion.sh        | 10 ++++-----
 t/test-terminal.perl         | 32 +++++++++++++--------------
 11 files changed, 97 insertions(+), 97 deletions(-)


base-commit: 54e85e7af1ac9e9a92888060d6811ae767fea1bc
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-734%2Fdscho%2Favoid-unnecessary-branch-name-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-734/dscho/avoid-unnecessary-branch-name-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/734

Range-diff vs v1:

 1:  587ddca42a = 1:  587ddca42a fast-export: avoid using unnecessary language in a code comment
 2:  3b4ae48d4a ! 2:  80e1d46cce t/test-terminal: avoid non-inclusive language
     @@ Commit message
          least we can get rid of the usage of the word `master` and hope that
          IO::Pty will be eventually adjusted, too.
      
     +    Guessing that IO::Pty might follow Python's lead, we replace the name
     +    `master` by `parent` (hoping that IO::Pty will adopt the parent/child
     +    nomenclature, too).
     +
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## t/test-terminal.perl ##
     @@ t/test-terminal.perl: sub copy_stdio {
      -close $master_err->slave;
      -my $in_pid = copy_stdin($master_in);
      -copy_stdio($master_out, $master_err);
     -+my $primary_in = new IO::Pty;
     -+my $primary_out = new IO::Pty;
     -+my $primary_err = new IO::Pty;
     -+$primary_in->set_raw();
     -+$primary_out->set_raw();
     -+$primary_err->set_raw();
     -+$primary_in->slave->set_raw();
     -+$primary_out->slave->set_raw();
     -+$primary_err->slave->set_raw();
     -+my $pid = start_child(\@ARGV, $primary_in->slave, $primary_out->slave, $primary_err->slave);
     -+close $primary_in->slave;
     -+close $primary_out->slave;
     -+close $primary_err->slave;
     -+my $in_pid = copy_stdin($primary_in);
     -+copy_stdio($primary_out, $primary_err);
     ++my $parent_in = new IO::Pty;
     ++my $parent_out = new IO::Pty;
     ++my $parent_err = new IO::Pty;
     ++$parent_in->set_raw();
     ++$parent_out->set_raw();
     ++$parent_err->set_raw();
     ++$parent_in->slave->set_raw();
     ++$parent_out->slave->set_raw();
     ++$parent_err->slave->set_raw();
     ++my $pid = start_child(\@ARGV, $parent_in->slave, $parent_out->slave, $parent_err->slave);
     ++close $parent_in->slave;
     ++close $parent_out->slave;
     ++close $parent_err->slave;
     ++my $in_pid = copy_stdin($parent_in);
     ++copy_stdio($parent_out, $parent_err);
       my $ret = finish_child($pid);
       # If the child process terminates before our copy_stdin() process is able to
      -# write all of its data to $master_in, the copy_stdin() process could stall.
     -+# write all of its data to $primary_in, the copy_stdin() process could stall.
     ++# write all of its data to $parent_in, the copy_stdin() process could stall.
       # Send SIGTERM to it to ensure it terminates.
       kill 'TERM', $in_pid;
       finish_child($in_pid);
 3:  2f1d0a2df4 ! 3:  8d8e9abfe2 t3200: avoid variations of the `master` branch name
     @@ Commit message
          The `t3200-branch.sh` script uses variations of this name for branches
          other than the default one. So let's change those names, as
          "lowest-hanging fruits" in the effort to use more inclusive naming
     -    throughout Git's source code.
     +    throughout Git's source code. While at it, make those branch names
     +    independent from the default branch name.
      
     -    In this particular instance, this requires a couple of non-trivial
     -    adjustments, as the aligned output depends on the maximum length of the
     -    displayed branches (which we now changed), and also on the alphabetical
     -    order (which we now changed, too).
     +    In this particular instance, this rename requires a couple of
     +    non-trivial adjustments, as the aligned output depends on the maximum
     +    length of the displayed branches (which we now changed), and also on the
     +    alphabetical order (which we now changed, too).
      
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
      
     @@ t/t3200-branch.sh: test_expect_success 'git branch -M master master should work
       '
       
      -test_expect_success 'git branch -M master2 master2 should work when master is checked out' '
     -+test_expect_success 'git branch -M main2 main2 should work when master is checked out' '
     ++test_expect_success 'git branch -M topic topic should work when master is checked out' '
       	git checkout master &&
      -	git branch master2 &&
      -	git branch -M master2 master2
     -+	git branch main2 &&
     -+	git branch -M main2 main2
     ++	git branch topic &&
     ++	git branch -M topic topic
       '
       
       test_expect_success 'git branch -v -d t should work' '
     @@ t/t3200-branch.sh: test_expect_success 'git branch --list -v with --abbrev' '
       	cat >expect <<\EOF &&
      -  a/b/c     bam       foo       l       * master    mb        o/o       q
      -  abc       bar       j/k       m/m       master2   n         o/p       r
     -+  a/b/c    bam      foo      l        main2    mb       o/o      q
     -+  abc      bar      j/k      m/m    * master   n        o/p      r
     ++  a/b/c    bam      foo      l      * master   n        o/p      r
     ++  abc      bar      j/k      m/m      mb       o/o      q        topic
       EOF
       	test_cmp expect actual
       '
      @@ t/t3200-branch.sh: test_expect_success 'git branch --column with an extremely long branch name' '
     -   j/k
         l
         m/m
     -+  main2
       * master
      -  master2
         mb
         n
         o/o
     +   o/p
     +   q
     +   r
     ++  topic
     +   $long
     + EOF
     + 	test_cmp expect actual
      @@ t/t3200-branch.sh: test_expect_success 'git branch with column.*' '
       	git config --unset column.branch &&
       	git config --unset column.ui &&
       	cat >expect <<\EOF &&
      -  a/b/c   bam   foo   l   * master    mb   o/o   q
      -  abc     bar   j/k   m/m   master2   n    o/p   r
     -+  a/b/c   bam   foo   l     main2    mb   o/o   q
     -+  abc     bar   j/k   m/m * master   n    o/p   r
     ++  a/b/c   bam   foo   l   * master   n     o/p   r
     ++  abc     bar   j/k   m/m   mb       o/o   q     topic
       EOF
       	test_cmp expect actual
       '
     @@ t/t3200-branch.sh: test_expect_success 'git branch --column -v should fail' '
       	cat >expect <<\EOF &&
         a/b/c
      @@ t/t3200-branch.sh: test_expect_success 'git branch -v with column.ui ignored' '
     -   j/k
         l
         m/m
     -+  main2
       * master
      -  master2
         mb
         n
         o/o
     +   o/p
     +   q
     +   r
     ++  topic
     + EOF
     + 	test_cmp expect actual
     + '
      @@ t/t3200-branch.sh: test_expect_success 'git branch -C master master should work when master is chec
       	git branch -C master master
       '
     @@ t/t3200-branch.sh: test_expect_success 'deleting a self-referential symref' '
      -	git symbolic-ref refs/heads/master2 refs/heads/master &&
      -	test_must_fail git branch -m master2 master3 &&
      -	git symbolic-ref refs/heads/master2 &&
     -+	git symbolic-ref refs/heads/main2 refs/heads/master &&
     -+	test_must_fail git branch -m main2 main3 &&
     -+	git symbolic-ref refs/heads/main2 &&
     ++	git symbolic-ref refs/heads/topic refs/heads/master &&
     ++	test_must_fail git branch -m topic new-topic &&
     ++	git symbolic-ref refs/heads/topic &&
       	test_path_is_file .git/refs/heads/master &&
      -	test_path_is_missing .git/refs/heads/master3
     -+	test_path_is_missing .git/refs/heads/main3
     ++	test_path_is_missing .git/refs/heads/new-topic
       '
       
       test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '
 4:  a532053e60 = 4:  8f59e19b95 tests: avoid variations of the `master` branch name
 5:  d135a8423b = 5:  c2c1238b5d t9902: avoid using the branch name `master`

-- 
gitgitgadget

  parent reply	other threads:[~2020-09-21 22:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-16 18:10 [PATCH 0/5] Inclusive naming, part II Johannes Schindelin via GitGitGadget
2020-09-16 18:10 ` [PATCH 1/5] fast-export: avoid using unnecessary language in a code comment Johannes Schindelin via GitGitGadget
2020-09-16 21:05   ` Junio C Hamano
2020-09-16 18:10 ` [PATCH 2/5] t/test-terminal: avoid non-inclusive language Johannes Schindelin via GitGitGadget
2020-09-16 21:05   ` Junio C Hamano
2020-09-16 21:25     ` Junio C Hamano
2020-09-20 15:34       ` Johannes Schindelin
2020-09-21 21:12         ` Junio C Hamano
2020-09-16 18:10 ` [PATCH 3/5] t3200: avoid variations of the `master` branch name Johannes Schindelin via GitGitGadget
2020-09-16 21:11   ` Jeff King
2020-09-16 22:28     ` Junio C Hamano
2020-09-16 22:39       ` Jeff King
2020-09-20 15:43         ` Johannes Schindelin
2020-09-21 21:26           ` Junio C Hamano
2020-09-16 18:10 ` [PATCH 4/5] tests: " Johannes Schindelin via GitGitGadget
2020-09-16 18:10 ` [PATCH 5/5] t9902: avoid using the branch name `master` Johannes Schindelin via GitGitGadget
2020-09-21 22:01 ` Johannes Schindelin via GitGitGadget [this message]
2020-09-21 22:01   ` [PATCH v2 1/5] fast-export: avoid using unnecessary language in a code comment Johannes Schindelin via GitGitGadget
2020-09-21 22:01   ` [PATCH v2 2/5] t/test-terminal: avoid non-inclusive language Johannes Schindelin via GitGitGadget
2020-09-21 22:01   ` [PATCH v2 3/5] t3200: avoid variations of the `master` branch name Johannes Schindelin via GitGitGadget
2020-09-21 22:01   ` [PATCH v2 4/5] tests: " Johannes Schindelin via GitGitGadget
2020-09-21 22:31     ` Junio C Hamano
2020-09-26  4:20       ` Johannes Schindelin
2020-09-21 22:01   ` [PATCH v2 5/5] t9902: avoid using the branch name `master` Johannes Schindelin via GitGitGadget
2020-09-21 22:35     ` Junio C Hamano
2020-09-26  4:25       ` Johannes Schindelin
2020-09-21 22:24   ` [PATCH v2 0/5] Inclusive naming, part II Jeff King
2020-09-26  4:29     ` Johannes Schindelin
2020-09-27  8:45       ` Jeff King
2020-09-26 21:04   ` [PATCH v3 " Johannes Schindelin via GitGitGadget
2020-09-26 21:04     ` [PATCH v3 1/5] fast-export: avoid using unnecessary language in a code comment Johannes Schindelin via GitGitGadget
2020-09-26 21:04     ` [PATCH v3 2/5] t/test-terminal: avoid non-inclusive language Johannes Schindelin via GitGitGadget
2020-09-26 21:04     ` [PATCH v3 3/5] t3200: avoid variations of the `master` branch name Johannes Schindelin via GitGitGadget
2020-09-26 21:04     ` [PATCH v3 4/5] tests: " Johannes Schindelin via GitGitGadget
2020-09-26 21:04     ` [PATCH v3 5/5] t9902: avoid using the branch name `master` Johannes Schindelin via GitGitGadget
2020-09-30 22:21     ` [PATCH v3 0/5] Inclusive naming, part II Junio C Hamano
2020-09-30 22:34       ` Jeff King
2020-09-30 22:57         ` 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=pull.734.v2.git.1600725687.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).