Avoid main as branch name in the test suite
PATCH 1/2 t1415: avoid using `main` as ref name
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
In preparation for a patch series that will change the fall-back for init.defaultBranch to main, let's not use main as ref name in this test script.
Since we already use the name "second" for a secondary worktree that is created in this test, let's use the name "first" for those refs instead.
While at it, adjust the test titles where "repo" was used by mistake instead of the term "worktree".
--- t/t1415-worktree-refs.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
t/t1415-worktree-refs.sh +9 -9
@@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' ' test_cmp expected actual.wt2 ' -test_expect_success 'for-each-ref from main repo' ' +test_expect_success 'for-each-ref from main worktree' ' mkdir fer1 && git -C fer1 init repo && test_commit -C fer1/repo initial && git -C fer1/repo worktree add ../second && - git -C fer1/repo update-ref refs/bisect/main HEAD && - git -C fer1/repo update-ref refs/rewritten/main HEAD && - git -C fer1/repo update-ref refs/worktree/main HEAD && - git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual && + git -C fer1/repo update-ref refs/bisect/first HEAD && + git -C fer1/repo update-ref refs/rewritten/first HEAD && + git -C fer1/repo update-ref refs/worktree/first HEAD && + git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual && cat >expected <<-\EOF && - refs/bisect/main - refs/rewritten/main - refs/worktree/main + refs/bisect/first + refs/rewritten/first + refs/worktree/first EOF test_cmp expected actual ' -test_expect_success 'for-each-ref from linked repo' ' +test_expect_success 'for-each-ref from linked worktree' ' mkdir fer2 && git -C fer2 init repo && test_commit -C fer2/repo initial &&
Signature · 1 line
gitgitgadget
cover Avoid main as branch name in the test suite
In preparation for changing the default branch name to main, let's stop using it as non-default branch name in the test suite.
This is the last preparatory step before the patch series that intends to change the default branch name to main. See
https://github.com/gitgitgadget/git/pull/655 for the entire game plan.
Johannes Schindelin (2):
t1415: avoid using main as ref name
tests: avoid using the branch name main
t/t1415-worktree-refs.sh | 18 +++++++++--------- 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 ++-- 5 files changed, 25 insertions(+), 25 deletions(-)
base-commit: 306ee63a703ad67c54ba1209dc11dd9ea500dc1f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-743%2Fdscho%2Favoid-main-as-branch-name-in-tests-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-743/dscho/avoid-main-as-branch-name-in-tests-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/743
Signature · 1 line
gitgitgadget
PATCH 2/2 tests: avoid using the branch name `main`
From: Johannes Schindelin <[email protected]>
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.
--- 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(-)
t/t6012-rev-list-simplify.sh +4 -4
@@ -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 && echo base >file && git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' ' git add file && test_commit B && - git switch main && + git switch primary && test_must_fail git merge -m "M" B && echo A >file && echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' ' git merge -m R -Xtheirs X && note R && - git switch main && + git switch primary && git merge -m N R && note N &&
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' ' git add z && test_commit Z && - git switch main && + git switch primary && git merge -m O Z && note O &&
t/t6400-merge-df.sh +4 -4
@@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' ' git add . && git commit -m initial && - git branch main && + git branch primary && git branch other && git checkout other &&
@@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' ' git add -u && git commit -m other && - git checkout main && - echo main >foo/bar/baz && + git checkout primary && + echo primary >foo/bar/baz && git add -u && - git commit -m main && + git commit -m primary && git merge other && git ls-files -s >out &&
t/t6409-merge-subtree.sh +6 -6
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' ' test_commit foo ' -test_expect_success 'setup branch main' ' - git checkout -b main master && +test_expect_success 'setup branch primary' ' + git checkout -b primary master && git merge -s ours --no-commit --allow-unrelated-histories sub && git read-tree --prefix=dir/ -u sub && - git commit -m "initial merge of sub into main" && + git commit -m "initial merge of sub into primary" && test_path_is_file dir/foo.t && test_path_is_file hello '
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' ' test_commit bar ' -test_expect_success 'update branch main' ' - git checkout main && - git merge -s subtree sub -m "second merge of sub into main" && +test_expect_success 'update branch primary' ' + git checkout primary && + git merge -s subtree sub -m "second merge of sub into primary" && test_path_is_file dir/bar.t && test_path_is_file dir/foo.t && test_path_is_file hello
t/t6430-merge-recursive.sh +2 -2
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' ' test_expect_success 'merging with triple rename across D/F conflict' ' git reset --hard HEAD && - git checkout -b main && + git checkout -b primary && git rm -rf . && echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' ' test_tick && git commit -a -m changesimplefile && - git checkout main && + git checkout primary && git rm sub1 && git mv sub2 sub1 && test_tick &&
Signature · 1 line
gitgitgadget
Re: [PATCH 1/2] t1415: avoid using `main` as ref name
In reply to Johannes Schindelin via GitGitGadgetHi,
Quoted 3 lines · Johannes Schindelin
In preparation for a patch series that will change the fall-back for
init.defaultBranchtomain, let's not usemainas ref name in this test script.
Interesting. I assume the issue is this line?
- git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&
I.e., it's not actually that naming a worktree "main" will break anything, but just that the test catches refs/heads/main in the same net when it does grepping?
If the commit message explains that, then this patch looks good to me. Without such an explanation, it would make me fear that we have some underlying bug in "git worktree".
Thanks,
Jonathan
Re: [PATCH 2/2] tests: avoid using the branch name `main`
In reply to Johannes Schindelin via GitGitGadgetQuoted 17 lines · Johannes Schindelin
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 byprimary.Signed-off-by Johannes Schindelin <[email protected]>--- 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(-)t/t6012-rev-list-simplify.sh +0
-0
t/t6012-rev-list-simplify.sh test_expect_success '--full-diff is not affected by --parents' ' · line 174
Quoted 5 lines
t/t6012-rev-list-simplify.sh +1
-1@@ -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
Re: [PATCH 1/2] t1415: avoid using `main` as ref name
In reply to Jonathan NiederHi Jonathan,
Quoted 7 lines · Jonathan Nieder
Quoted 3 lines · Johannes Schindelin
In preparation for a patch series that will change the fall-back for
init.defaultBranchtomain, let's not usemainas ref name in this test script.
Quoted 7 lines
Interesting. I assume the issue is this line?
- git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual &&I.e., it's not actually that naming a worktree "main" will break anything, but just that the test catches refs/heads/main in the same net when it does grepping?
Right.
Quoted 3 lines
If the commit message explains that, then this patch looks good to me. Without such an explanation, it would make me fear that we have some underlying bug in "git worktree".
Indeed. This is my current revision of the commit message:
t1415: avoid using main as ref name
In preparation for a patch series that will change the fall-back for init.defaultBranch to main, let's not use main as ref name in this test script.
Otherwise, the git for-each-ref ... | grep main which wants to catch those refs would also unexpectedly catch refs/heads/main.
Since the refs in question are worktree-local ones (i.e. each worktree has their own, just like HEAD), and since the test case already uses a secondary worktree called "second", let's use the name "first" for those refs instead.
While at it, adjust the test titles that talk about a "repo" when they meant a "worktree" instead.
Ciao,
Dscho
Re: [PATCH 2/2] tests: avoid using the branch name `main`
In reply to Jonathan NiederHi Jonathan,
Quoted 14 lines · Jonathan Nieder
Quoted 12 lines · Johannes Schindelin
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 byprimary.Signed-off-by Johannes Schindelin <[email protected]>--- 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(-)
Quoted 12 lines
t/t6012-rev-list-simplify.sh test_expect_success '--full-diff is not affected by --parents' ' · line 174
Quoted 10 lines
t/t6012-rev-list-simplify.sh +1
-1@@ -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?
Nope, of course not ;-)
Quoted 5 lines
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").
I guess that Stolee (Cc:ed) had something like that in mind.
When I look at 8d049e182e2 (revision: --show-pulls adds helpful merges, 2020-04-10), I get the impression that does not _really_ care about the name of the main branch, it just wants to know the name so it can switch back and forth.
If I had had the presence of mind when reviewing that patch back in April, I would probably have advocated for the use of git switch -...
In any case, I would like to keep this consistent with the remainder of the test scripts modified by this patch, and use the relatively neutral topic here.
Ciao,
Dscho
Quoted 6 lines
That suggests an alternative that is agnostic to init.defaultBranch:
what if this uses "git switch -C main"?Thanks,
Jonathan
v2 cover Avoid main as branch name in the test suite
In reply to Johannes Schindelin via GitGitGadgetIn preparation for changing the default branch name to main, let's stop using it as non-default branch name in the test suite.
This is the last preparatory step before the patch series that intends to change the default branch name to main. See
https://github.com/gitgitgadget/git/pull/655 for the entire game plan.
Changes since v1:
* The commit message of the t1415 patch elaborates a but more about the rationale for the change.
* Instead of primary, the second patch renames all of those branches to topic, imitating b6211b89eb3 (tests: avoid variations of the master branch name, 2020-09-26).
Johannes Schindelin (2):
t1415: avoid using main as ref name
tests: avoid using the branch name main
t/t1415-worktree-refs.sh | 18 +++++++++--------- 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 ++-- 5 files changed, 25 insertions(+), 25 deletions(-)
base-commit: 306ee63a703ad67c54ba1209dc11dd9ea500dc1f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-743%2Fdscho%2Favoid-main-as-branch-name-in-tests-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-743/dscho/avoid-main-as-branch-name-in-tests-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/743
Range-diff vs v1:
1: d3f7b39a2f ! 1: 2c6f41f9ad t1415: avoid using main as ref name
@@ Commit message
init.defaultBranch to main, let's not use main as ref name in this test script.
- Since we already use the name "second" for a secondary worktree that is
- created in this test, let's use the name "first" for those refs instead.
+ Otherwise, the git for-each-ref ... | grep main which wants to catch
+ those refs would also unexpectedly catch refs/heads/main.
- While at it, adjust the test titles where "repo" was used by mistake
- instead of the term "worktree".
+ Since the refs in question are worktree-local ones (i.e. each worktree
+ has their own, just like HEAD), and since the test case already uses a
+ secondary worktree called "second", let's use the name "first" for those
+ refs instead.
+
+ While at it, adjust the test titles that talk about a "repo" when they
+ meant a "worktree" instead.
2: 6045ceb938 ! 2: b187571778 tests: avoid using the branch name main
@@ Commit message
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`.
+ test suite. Replace that branch name by `topic`, the same name we used
+ to rename variations of `master` in b6211b89eb3 (tests: avoid variations
+ of the `master` branch name, 2020-09-26).
Signed-off-by: Johannes Schindelin <[email protected]>
@@ t/t6012-rev-list-simplify.sh: test_expect_success '--full-diff is not affected b
rm -rf .git * &&
git init &&
- git switch -c main &&
-+ git switch -c primary &&
++ git switch -c topic &&
echo base >file &&
git add file &&
@@ t/t6012-rev-list-simplify.sh: test_expect_success 'rebuild repo' '
test_commit B &&
- git switch main &&
-+ git switch primary &&
++ git switch topic &&
test_must_fail git merge -m "M" B &&
echo A >file &&
echo B >>file &&
@@ t/t6012-rev-list-simplify.sh: test_expect_success 'rebuild repo' '
note R &&
- git switch main &&
-+ git switch primary &&
++ git switch topic &&
git merge -m N R &&
note N &&
@@ t/t6012-rev-list-simplify.sh: test_expect_success 'rebuild repo' '
test_commit Z &&
- git switch main &&
-+ git switch primary &&
++ git switch topic &&
git merge -m O Z &&
note O &&
@@ t/t6400-merge-df.sh: test_expect_success 'Simple merge in repo with interesting
git commit -m initial &&
- git branch main &&
-+ git branch primary &&
++ git branch topic &&
git branch other &&
git checkout other &&
@@ t/t6400-merge-df.sh: test_expect_success 'Simple merge in repo with interesting
- git checkout main &&
- echo main >foo/bar/baz &&
-+ git checkout primary &&
-+ echo primary >foo/bar/baz &&
++ git checkout topic &&
++ echo topic >foo/bar/baz &&
git add -u &&
- git commit -m main &&
-+ git commit -m primary &&
++ git commit -m topic &&
git merge other &&
git ls-files -s >out &&
@@ t/t6409-merge-subtree.sh: test_expect_success 'setup branch sub' '
-test_expect_success 'setup branch main' '
- git checkout -b main master &&
-+test_expect_success 'setup branch primary' '
-+ git checkout -b primary master &&
++test_expect_success 'setup topic branch' '
++ git checkout -b topic master &&
git merge -s ours --no-commit --allow-unrelated-histories sub &&
git read-tree --prefix=dir/ -u sub &&
- git commit -m "initial merge of sub into main" &&
-+ git commit -m "initial merge of sub into primary" &&
++ git commit -m "initial merge of sub into topic" &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
'
@@ t/t6409-merge-subtree.sh: test_expect_success 'update branch sub' '
-test_expect_success 'update branch main' '
- git checkout main &&
- git merge -s subtree sub -m "second merge of sub into main" &&
-+test_expect_success 'update branch primary' '
-+ git checkout primary &&
-+ git merge -s subtree sub -m "second merge of sub into primary" &&
++test_expect_success 'update topic branch' '
++ git checkout topic &&
++ git merge -s subtree sub -m "second merge of sub into topic" &&
test_path_is_file dir/bar.t &&
test_path_is_file dir/foo.t &&
test_path_is_file hello
@@ t/t6430-merge-recursive.sh: test_expect_failure 'merge-recursive rename vs. rena
test_expect_success 'merging with triple rename across D/F conflict' '
git reset --hard HEAD &&
- git checkout -b main &&
-+ git checkout -b primary &&
++ git checkout -b topic &&
git rm -rf . &&
echo "just a file" >sub1 &&
@@ t/t6430-merge-recursive.sh: test_expect_success 'merging with triple rename acro
git commit -a -m changesimplefile &&
- git checkout main &&
-+ git checkout primary &&
++ git checkout topic &&
git rm sub1 &&
git mv sub2 sub1 &&
test_tick &&Signature · 1 line
gitgitgadget
PATCH v2 1/2 t1415: avoid using `main` as ref name
From: Johannes Schindelin <[email protected]>
In preparation for a patch series that will change the fall-back for init.defaultBranch to main, let's not use main as ref name in this test script.
Otherwise, the git for-each-ref ... | grep main which wants to catch those refs would also unexpectedly catch refs/heads/main.
Since the refs in question are worktree-local ones (i.e. each worktree has their own, just like HEAD), and since the test case already uses a secondary worktree called "second", let's use the name "first" for those refs instead.
While at it, adjust the test titles that talk about a "repo" when they meant a "worktree" instead.
--- t/t1415-worktree-refs.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
t/t1415-worktree-refs.sh +9 -9
@@ -76,24 +76,24 @@ test_expect_success 'reflog of worktrees/xx/HEAD' ' test_cmp expected actual.wt2 ' -test_expect_success 'for-each-ref from main repo' ' +test_expect_success 'for-each-ref from main worktree' ' mkdir fer1 && git -C fer1 init repo && test_commit -C fer1/repo initial && git -C fer1/repo worktree add ../second && - git -C fer1/repo update-ref refs/bisect/main HEAD && - git -C fer1/repo update-ref refs/rewritten/main HEAD && - git -C fer1/repo update-ref refs/worktree/main HEAD && - git -C fer1/repo for-each-ref --format="%(refname)" | grep main >actual && + git -C fer1/repo update-ref refs/bisect/first HEAD && + git -C fer1/repo update-ref refs/rewritten/first HEAD && + git -C fer1/repo update-ref refs/worktree/first HEAD && + git -C fer1/repo for-each-ref --format="%(refname)" | grep first >actual && cat >expected <<-\EOF && - refs/bisect/main - refs/rewritten/main - refs/worktree/main + refs/bisect/first + refs/rewritten/first + refs/worktree/first EOF test_cmp expected actual ' -test_expect_success 'for-each-ref from linked repo' ' +test_expect_success 'for-each-ref from linked worktree' ' mkdir fer2 && git -C fer2 init repo && test_commit -C fer2/repo initial &&
Signature · 1 line
gitgitgadget
PATCH v2 2/2 tests: avoid using the branch name `main`
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
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 topic, the same name we used to rename variations of master in b6211b89eb3 (tests: avoid variations of the master branch name, 2020-09-26).
--- 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(-)
t/t6012-rev-list-simplify.sh +4 -4
@@ -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 topic && echo base >file && git add file &&
@@ -186,7 +186,7 @@ test_expect_success 'rebuild repo' ' git add file && test_commit B && - git switch main && + git switch topic && test_must_fail git merge -m "M" B && echo A >file && echo B >>file &&
@@ -207,7 +207,7 @@ test_expect_success 'rebuild repo' ' git merge -m R -Xtheirs X && note R && - git switch main && + git switch topic && git merge -m N R && note N &&
@@ -221,7 +221,7 @@ test_expect_success 'rebuild repo' ' git add z && test_commit Z && - git switch main && + git switch topic && git merge -m O Z && note O &&
t/t6400-merge-df.sh +4 -4
@@ -124,7 +124,7 @@ test_expect_success 'Simple merge in repo with interesting pathnames' ' git add . && git commit -m initial && - git branch main && + git branch topic && git branch other && git checkout other &&
@@ -132,10 +132,10 @@ test_expect_success 'Simple merge in repo with interesting pathnames' ' git add -u && git commit -m other && - git checkout main && - echo main >foo/bar/baz && + git checkout topic && + echo topic >foo/bar/baz && git add -u && - git commit -m main && + git commit -m topic && git merge other && git ls-files -s >out &&
t/t6409-merge-subtree.sh +6 -6
@@ -35,11 +35,11 @@ test_expect_success 'setup branch sub' ' test_commit foo ' -test_expect_success 'setup branch main' ' - git checkout -b main master && +test_expect_success 'setup topic branch' ' + git checkout -b topic master && git merge -s ours --no-commit --allow-unrelated-histories sub && git read-tree --prefix=dir/ -u sub && - git commit -m "initial merge of sub into main" && + git commit -m "initial merge of sub into topic" && test_path_is_file dir/foo.t && test_path_is_file hello '
@@ -49,9 +49,9 @@ test_expect_success 'update branch sub' ' test_commit bar ' -test_expect_success 'update branch main' ' - git checkout main && - git merge -s subtree sub -m "second merge of sub into main" && +test_expect_success 'update topic branch' ' + git checkout topic && + git merge -s subtree sub -m "second merge of sub into topic" && test_path_is_file dir/bar.t && test_path_is_file dir/foo.t && test_path_is_file hello
t/t6430-merge-recursive.sh +2 -2
@@ -663,7 +663,7 @@ test_expect_failure 'merge-recursive rename vs. rename/symlink' ' test_expect_success 'merging with triple rename across D/F conflict' ' git reset --hard HEAD && - git checkout -b main && + git checkout -b topic && git rm -rf . && echo "just a file" >sub1 &&
@@ -682,7 +682,7 @@ test_expect_success 'merging with triple rename across D/F conflict' ' test_tick && git commit -a -m changesimplefile && - git checkout main && + git checkout topic && git rm sub1 && git mv sub2 sub1 && test_tick &&
Signature · 1 line
gitgitgadget
Re: [PATCH 2/2] tests: avoid using the branch name `main`
In reply to Johannes SchindelinQuoted 15 lines · Johannes Schindelin
Quoted 5 lines · Jonathan Nieder
t/t6012-rev-list-simplify.sh test_expect_success '--full-diff is not affected by --parents' ' · line 174
Quoted 2 lines · Johannes Schindelin
t/t6012-rev-list-simplify.sh +1
-1- git switch -c main && + git switch -c primary &&Is there a secondary corresponding to this primary?
Nope, of course not ;-)
Quoted 5 lines
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").
Quoted 6 lines
I guess that Stolee (Cc:ed) had something like that in mind.
When I look at
8d049e182e2(revision: --show-pulls adds helpful merges, 2020-04-10), I get the impression that does not _really_ care about the name of the main branch, it just wants to know the name so it can switch back and forth.
The branch name here is not important, so please replace it with whatever works best for you.
What _is_ important is keeping the commit messages in agreement with the commented ASCII-art DAG above this test. It does not mention the branch names, so this change will not cause an inconsistent comment.
Thanks,
-Stolee