Re: [PATCH 3/6] t7419: Actually test the branch switching
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 4, 2023, 00:20 UTC
- Message-ID
- <xmqqedibutk4.fsf@gitster.g>
- In-Reply-To
- <20231003185047.2697995-3-heftig@archlinux.org>
"Jan Alexander Steffens (heftig)" <heftig@archlinux.org> writes:
> Subject: Re: [PATCH 3/6] t7419: Actually test the branch switching
"Actually" -> "actually".
Show 10 quoted lines
> The submodule repo the test set up had the 'topic' branch checked out, > meaning the repo's default branch (HEAD) is the 'topic' branch. > > The following tests then pretended to switch between the default branch > and the 'topic' branch. This was papered over by continually adding > commits to the 'topic' branch and checking if the submodule gets updated > to this new commit. > > Return the submodule repo to the 'main' branch after setup so we can > actually test the switching behavior.
Nicely spotted.
Show 11 quoted lines
> diff --git a/t/t7419-submodule-set-branch.sh b/t/t7419-submodule-set-branch.sh > index 232065504c..5ac16d0eb7 100755 > --- a/t/t7419-submodule-set-branch.sh > +++ b/t/t7419-submodule-set-branch.sh > @@ -11,23 +11,28 @@ as expected. > > TEST_PASSES_SANITIZE_LEAK=true > TEST_NO_CREATE_REPO=1 > + > +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main > +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
And it is good that this variable is used to prepare the test for both kinds of CI runs that use 'main' or 'master' as the default branch.