{"thread":{"id":"54662","subject":"[PATCH] t1309: use a non-loaded branch name in the `onbranch` test cases","startedAt":"2020-11-18T14:23:57Z","lastAt":"2020-11-19T11:42:00Z","messageCount":6,"participants":["Johannes Schindelin via GitGitGadget","Ævar Arnfjörð Bjarmason","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"410228","messageId":"pull.791.git.1605709410465.gitgitgadget@gmail.com","threadId":"54662","inReplyTo":null,"subject":"[PATCH] t1309: use a non-loaded branch name in the `onbranch` test cases","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-18T14:23:30Z","receivedAt":"2020-11-18T14:23:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `onbranch` test cases in question do not actually want to include\nanything; Instead, they want to verify that the `onbranch` code path\ndoes not regress in the early-config case or in the non-Git case, where\nthe `onbranch` include is actually ignored.\n\nTherefore, the actual branch name does not matter at all. We might just\nas well avoid racially-charged names here.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    t1309: use a non-loaded branch name in the onbranch test cases\n    \n    Just something I stumbled over while working on \n    https://github.com/gitgitgadget/git/pull/762.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-791%2Fdscho%2Ft1309-onbranch-tests-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-791/dscho/t1309-onbranch-tests-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/791\n\n t/t1309-early-config.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh\nindex ebb8e1aecb..b4a9158307 100755\n--- a/t/t1309-early-config.sh\n+++ b/t/t1309-early-config.sh\n@@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '\n \n test_expect_success 'early config and onbranch' '\n \techo \"[broken\" >broken &&\n-\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n+\ttest_with_config \"[includeif \\\"onbranch:topic\\\"]path=../broken\"\n '\n \n test_expect_success 'onbranch config outside of git repo' '\n-\ttest_config_global includeIf.onbranch:master.path non-existent &&\n+\ttest_config_global includeIf.onbranch:topic.path non-existent &&\n \tnongit git help\n '\n \n\nbase-commit: e31aba42fb12bdeb0f850829e008e1e3f43af500\n-- \ngitgitgadget\n"},{"id":"410234","messageId":"87a6vera3q.fsf@evledraar.gmail.com","threadId":"54662","inReplyTo":"pull.791.git.1605709410465.gitgitgadget@gmail.com","subject":"Re: [PATCH] t1309: use a non-loaded branch name in the `onbranch` test cases","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-18T14:52:09Z","receivedAt":"2020-11-18T14:52:14Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Nov 18 2020, Johannes Schindelin via GitGitGadget wrote:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> The `onbranch` test cases in question do not actually want to include\n> anything; Instead, they want to verify that the `onbranch` code path\n> does not regress in the early-config case or in the non-Git case, where\n> the `onbranch` include is actually ignored.\n\nIt's unclear to me what this patch is for & why it's needed.\n\nYesterday in your v2 27/27 series you sent a different one that changed\nthis from s/master/main/g:\nhttps://lore.kernel.org/git/b8fa037791683b50c3efb01aa6ac0d3f7b888a2b.1605629548.git.gitgitgadget@gmail.com/\n\nThat's on top of \"next\", but this one is on \"master\", the two would\nconflict, and the 02/27 one seems like the right thing to do.\n\n> Therefore, the actual branch name does not matter at all. We might just\n> as well avoid racially-charged names here.\n\nIt seems to me the actual name matters a lot, and it must whatever the\ndefault branch name is.\n\nI.e. what the test is doing is producing intentionally broken config,\nand asserting that we don't read it at an early stage.\n\nTherefore if we regressed and started doing that the test wouldn't catch\nit, because the default branch name is \"master\", or \"main\" if/when that\nrefs.c change lands, neither of which is \"topic\".\n\nMaybe I'm missing something but it seems 58ebccb478 (\"t1309: use short\nbranch name in includeIf.onbranch test\", 2019-08-06) and your own\n85fe0e800c (\"config: work around bug with includeif:onbranch and early\nconfig\", 2019-07-31) which added the test support reading.\n\n\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>     t1309: use a non-loaded branch name in the onbranch test cases\n>     \n>     Just something I stumbled over while working on \n>     https://github.com/gitgitgadget/git/pull/762.\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-791%2Fdscho%2Ft1309-onbranch-tests-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-791/dscho/t1309-onbranch-tests-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/791\n>\n>  t/t1309-early-config.sh | 4 ++--\n>  1 file changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh\n> index ebb8e1aecb..b4a9158307 100755\n> --- a/t/t1309-early-config.sh\n> +++ b/t/t1309-early-config.sh\n> @@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '\n>  \n>  test_expect_success 'early config and onbranch' '\n>  \techo \"[broken\" >broken &&\n> -\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n> +\ttest_with_config \"[includeif \\\"onbranch:topic\\\"]path=../broken\"\n>  '\n>  \n>  test_expect_success 'onbranch config outside of git repo' '\n> -\ttest_config_global includeIf.onbranch:master.path non-existent &&\n> +\ttest_config_global includeIf.onbranch:topic.path non-existent &&\n>  \tnongit git help\n>  '\n>  \n>\n> base-commit: e31aba42fb12bdeb0f850829e008e1e3f43af500\n\n"},{"id":"410317","messageId":"nycvar.QRO.7.76.6.2011190107160.56@tvgsbejvaqbjf.bet","threadId":"54662","inReplyTo":"87a6vera3q.fsf@evledraar.gmail.com","subject":"Re: [PATCH] t1309: use a non-loaded branch name in the `onbranch` test cases","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-19T00:24:13Z","receivedAt":"2020-11-19T00:24:20Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Wed, 18 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n> On Wed, Nov 18 2020, Johannes Schindelin via GitGitGadget wrote:\n>\n> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >\n> > The `onbranch` test cases in question do not actually want to include\n> > anything; Instead, they want to verify that the `onbranch` code path\n> > does not regress in the early-config case or in the non-Git case, where\n> > the `onbranch` include is actually ignored.\n>\n> It's unclear to me what this patch is for & why it's needed.\n\nWell, the entire idea of switching to a new default branch name is to\navoid using words that we know cause undue emotional harm. In the grand\nscheme, therefore, I want to avoid having any mention of such words in our\ntest suite.\n\n> Yesterday in your v2 27/27 series you sent a different one that changed\n> this from s/master/main/g:\n> https://lore.kernel.org/git/b8fa037791683b50c3efb01aa6ac0d3f7b888a2b.1605629548.git.gitgitgadget@gmail.com/\n>\n> That's on top of \"next\", but this one is on \"master\", the two would\n> conflict, and the 02/27 one seems like the right thing to do.\n\nYeah, I hadn't made it clear yet at the time you wrote this that my\nintention was to give in to your and Junio's suggestion to restrict the\n`GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME` assignments to _just_ the test\nscripts that don't work with arbitrary default branch names.\n\nI had hoped that mentioning gitgitgadget PR 762 (which is that 27-strong\npatch series) would be indicator enough that I was in the process of\nrevamping it into a v3, and that this here patch is one part that I\nseparated out into its own patch.\n\n> > Therefore, the actual branch name does not matter at all. We might just\n> > as well avoid racially-charged names here.\n>\n> It seems to me the actual name matters a lot, and it must whatever the\n> default branch name is.\n\nNope. Not at all. Because what we're exercising is the code paths when we\n_don't_ have a branch name to work with.\n\nIn the non-Git case, this is trivial to see. There is not even a\nrepository! How can there be a branch?\n\nIn the early config case, it is too early to access the refs. I meant to\nreference (but forgot) the commit 85fe0e800ca (config: work around bug\nwith includeif:onbranch and early config, 2019-07-31) because that\ncommit's commit message describes the catch-22 that is the reason why the\nearly config cannot see the current branch name (if any).\n\nI should probably have thought of referencing 22932d9169f (config: stop\nchecking whether the_repository is NULL, 2019-08-06) for the second test\ncase, too.\n\nSo again, these two test cases do _not_ exercise the code path where\nanother config file is included. To the contrary, they try to prevent a\nregression where `onbranch` would segfault in one case, and BUG in the\nother (in both cases because the now-fixed code used to try to look at the\ncurrent branch name _anyway_).\n\n> I.e. what the test is doing is producing intentionally broken config,\n> and asserting that we don't read it at an early stage.\n>\n> Therefore if we regressed and started doing that the test wouldn't catch\n> it, because the default branch name is \"master\", or \"main\" if/when that\n> refs.c change lands, neither of which is \"topic\".\n\nNo, if we regressed, the code would start to throw a BUG, or a segfault,\nrespectively.\n\nWe never expect these two test cases to look at any branch name at all.\n\nCiao,\nDscho\n\n> Maybe I'm missing something but it seems 58ebccb478 (\"t1309: use short\n> branch name in includeIf.onbranch test\", 2019-08-06) and your own\n> 85fe0e800c (\"config: work around bug with includeif:onbranch and early\n> config\", 2019-07-31) which added the test support reading.\n>\n>\n> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> > ---\n> >     t1309: use a non-loaded branch name in the onbranch test cases\n> >\n> >     Just something I stumbled over while working on\n> >     https://github.com/gitgitgadget/git/pull/762.\n> >\n> > Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-791%2Fdscho%2Ft1309-onbranch-tests-v1\n> > Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-791/dscho/t1309-onbranch-tests-v1\n> > Pull-Request: https://github.com/gitgitgadget/git/pull/791\n> >\n> >  t/t1309-early-config.sh | 4 ++--\n> >  1 file changed, 2 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh\n> > index ebb8e1aecb..b4a9158307 100755\n> > --- a/t/t1309-early-config.sh\n> > +++ b/t/t1309-early-config.sh\n> > @@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '\n> >\n> >  test_expect_success 'early config and onbranch' '\n> >  \techo \"[broken\" >broken &&\n> > -\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n> > +\ttest_with_config \"[includeif \\\"onbranch:topic\\\"]path=../broken\"\n> >  '\n> >\n> >  test_expect_success 'onbranch config outside of git repo' '\n> > -\ttest_config_global includeIf.onbranch:master.path non-existent &&\n> > +\ttest_config_global includeIf.onbranch:topic.path non-existent &&\n> >  \tnongit git help\n> >  '\n> >\n> >\n> > base-commit: e31aba42fb12bdeb0f850829e008e1e3f43af500\n>\n>\n>\n"},{"id":"410335","messageId":"874kllre8f.fsf@evledraar.gmail.com","threadId":"54662","inReplyTo":"nycvar.QRO.7.76.6.2011190107160.56@tvgsbejvaqbjf.bet","subject":"Re: [PATCH] t1309: use a non-loaded branch name in the `onbranch` test cases","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2020-11-19T07:35:12Z","receivedAt":"2020-11-19T07:35:37Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Nov 19 2020, Johannes Schindelin wrote:\n\n> Hi Ævar,\n>\n> On Wed, 18 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n>\n>> On Wed, Nov 18 2020, Johannes Schindelin via GitGitGadget wrote:\n>>\n>> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> >\n>> > The `onbranch` test cases in question do not actually want to include\n>> > anything; Instead, they want to verify that the `onbranch` code path\n>> > does not regress in the early-config case or in the non-Git case, where\n>> > the `onbranch` include is actually ignored.\n>>\n>> It's unclear to me what this patch is for & why it's needed.\n>\n> Well, the entire idea of switching to a new default branch name is to\n> avoid using words that we know cause undue emotional harm. In the grand\n> scheme, therefore, I want to avoid having any mention of such words in our\n> test suite.\n\nI meant why there were two conflicting patches on-list that changed the\nsame hunks in different ways, both of which resulted in passing tests\nand seemingly fulfilled the goal you're noting here.\n\nLater you sent a v3 of the main series, which clarified this question:\nhttps://public-inbox.org/git/pull.762.v3.git.1605743086.gitgitgadget@gmail.com/\n\n>> Yesterday in your v2 27/27 series you sent a different one that changed\n>> this from s/master/main/g:\n>> https://lore.kernel.org/git/b8fa037791683b50c3efb01aa6ac0d3f7b888a2b.1605629548.git.gitgitgadget@gmail.com/\n>>\n>> That's on top of \"next\", but this one is on \"master\", the two would\n>> conflict, and the 02/27 one seems like the right thing to do.\n>\n> Yeah, I hadn't made it clear yet at the time you wrote this that my\n> intention was to give in to your and Junio's suggestion to restrict the\n> `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME` assignments to _just_ the test\n> scripts that don't work with arbitrary default branch names.\n>\n> I had hoped that mentioning gitgitgadget PR 762 (which is that 27-strong\n> patch series) would be indicator enough that I was in the process of\n> revamping it into a v3, and that this here patch is one part that I\n> separated out into its own patch.\n>\n>> > Therefore, the actual branch name does not matter at all. We might just\n>> > as well avoid racially-charged names here.\n>>\n>> It seems to me the actual name matters a lot, and it must whatever the\n>> default branch name is.\n>\n> Nope. Not at all. Because what we're exercising is the code paths when we\n> _don't_ have a branch name to work with.\n>\n> In the non-Git case, this is trivial to see. There is not even a\n> repository! How can there be a branch?\n>\n> In the early config case, it is too early to access the refs. I meant to\n> reference (but forgot) the commit 85fe0e800ca (config: work around bug\n> with includeif:onbranch and early config, 2019-07-31) because that\n> commit's commit message describes the catch-22 that is the reason why the\n> early config cannot see the current branch name (if any).\n>\n> I should probably have thought of referencing 22932d9169f (config: stop\n> checking whether the_repository is NULL, 2019-08-06) for the second test\n> case, too.\n>\n> So again, these two test cases do _not_ exercise the code path where\n> another config file is included. To the contrary, they try to prevent a\n> regression where `onbranch` would segfault in one case, and BUG in the\n> other (in both cases because the now-fixed code used to try to look at the\n> current branch name _anyway_).\n>\n>> I.e. what the test is doing is producing intentionally broken config,\n>> and asserting that we don't read it at an early stage.\n>>\n>> Therefore if we regressed and started doing that the test wouldn't catch\n>> it, because the default branch name is \"master\", or \"main\" if/when that\n>> refs.c change lands, neither of which is \"topic\".\n>\n> No, if we regressed, the code would start to throw a BUG, or a segfault,\n> respectively.\n>\n> We never expect these two test cases to look at any branch name at all.\n\n\nThanks. I mis(understood|read) it.\n"},{"id":"410343","messageId":"nycvar.QRO.7.76.6.2011191147490.56@tvgsbejvaqbjf.bet","threadId":"54662","inReplyTo":"874kllre8f.fsf@evledraar.gmail.com","subject":"Re: [PATCH] t1309: use a non-loaded branch name in the `onbranch` test cases","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-11-19T10:49:30Z","receivedAt":"2020-11-19T10:50:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Ævar,\n\nOn Thu, 19 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n\n> On Thu, Nov 19 2020, Johannes Schindelin wrote:\n>\n> > On Wed, 18 Nov 2020, Ævar Arnfjörð Bjarmason wrote:\n> >\n> >> On Wed, Nov 18 2020, Johannes Schindelin via GitGitGadget wrote:\n> >>\n> >> > From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> >> >\n> >> > Therefore, the actual branch name does not matter at all. We might\n> >> > just as well avoid racially-charged names here.\n> >>\n> >> It seems to me the actual name matters a lot, and it must whatever\n> >> the default branch name is.\n> >\n> > Nope. Not at all. Because what we're exercising is the code paths when\n> > we _don't_ have a branch name to work with.\n> >\n> > In the non-Git case, this is trivial to see. There is not even a\n> > repository! How can there be a branch?\n> >\n> > In the early config case, it is too early to access the refs. I meant\n> > to reference (but forgot) the commit 85fe0e800ca (config: work around\n> > bug with includeif:onbranch and early config, 2019-07-31) because that\n> > commit's commit message describes the catch-22 that is the reason why\n> > the early config cannot see the current branch name (if any).\n> >\n> > I should probably have thought of referencing 22932d9169f (config:\n> > stop checking whether the_repository is NULL, 2019-08-06) for the\n> > second test case, too.\n> >\n> > So again, these two test cases do _not_ exercise the code path where\n> > another config file is included. To the contrary, they try to prevent\n> > a regression where `onbranch` would segfault in one case, and BUG in\n> > the other (in both cases because the now-fixed code used to try to\n> > look at the current branch name _anyway_).\n> >\n> >> I.e. what the test is doing is producing intentionally broken config,\n> >> and asserting that we don't read it at an early stage.\n> >>\n> >> Therefore if we regressed and started doing that the test wouldn't\n> >> catch it, because the default branch name is \"master\", or \"main\"\n> >> if/when that refs.c change lands, neither of which is \"topic\".\n> >\n> > No, if we regressed, the code would start to throw a BUG, or a\n> > segfault, respectively.\n> >\n> > We never expect these two test cases to look at any branch name at\n> > all.\n>\n> Thanks. I mis(understood|read) it.\n\nI guess the commit message could use an update.\n\nCiao,\nDscho\n"},{"id":"410348","messageId":"pull.791.v2.git.1605786094533.gitgitgadget@gmail.com","threadId":"54662","inReplyTo":"pull.791.git.1605709410465.gitgitgadget@gmail.com","subject":"[PATCH v2] t1309: use a neutral branch name in the `onbranch` test cases","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-11-19T11:41:34Z","receivedAt":"2020-11-19T11:42:00Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThe `onbranch` test cases touched by this patch do not actually try to\ninclude any other config. Their purpose is to avoid regressing on two\nbugs in the `include.onbranch:<name>.path` code that we fixed in the\npast, bugs that are actually unrelated to any concrete branch name.\n\nThe first bug was fixed in 85fe0e800ca (config: work around bug with\nincludeif:onbranch and early config, 2019-07-31). Essentially, when\nreading early config, there would be a catch-22 trying to access the\nrefs, and therefore we simply cannot evaluate the condition at that\npoint. The test case ensures that we avoid emitting this bogus message:\n\n\tBUG: refs.c:1851: attempting to get main_ref_store outside of repository\n\nThe second test case concerns the non-Git scenario, where we simply do\nnot have a current branch to begin with (because we don't have a\nrepository in the first place), and the test case was introduced in\n22932d9169f (config: stop checking whether the_repository is NULL,\n2019-08-06) to ensure that we don't cause a segmentation fault should\nthe code still incorrectly try to look at any ref.\n\nIn short, neither of these two test cases will ever look at a current\nbranch name, even in case of regressions. Therefore, the actual branch\nname does not matter at all. We can therefore easily avoid\nracially-charged branch names here, and that's what this patch does.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    t1309: use a non-loaded branch name in the onbranch test cases\n    \n    Just something I stumbled over while working on \n    https://github.com/gitgitgadget/git/pull/762.\n    \n    Changes since v1:\n    \n     * The commit message was obviously not clear at all, which has been\n       addressed.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-791%2Fdscho%2Ft1309-onbranch-tests-v2\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-791/dscho/t1309-onbranch-tests-v2\nPull-Request: https://github.com/gitgitgadget/git/pull/791\n\nRange-diff vs v1:\n\n 1:  c78ddaf9ad ! 1:  7897650556 t1309: use a non-loaded branch name in the `onbranch` test cases\n     @@ Metadata\n      Author: Johannes Schindelin <Johannes.Schindelin@gmx.de>\n      \n       ## Commit message ##\n     -    t1309: use a non-loaded branch name in the `onbranch` test cases\n     +    t1309: use a neutral branch name in the `onbranch` test cases\n      \n     -    The `onbranch` test cases in question do not actually want to include\n     -    anything; Instead, they want to verify that the `onbranch` code path\n     -    does not regress in the early-config case or in the non-Git case, where\n     -    the `onbranch` include is actually ignored.\n     +    The `onbranch` test cases touched by this patch do not actually try to\n     +    include any other config. Their purpose is to avoid regressing on two\n     +    bugs in the `include.onbranch:<name>.path` code that we fixed in the\n     +    past, bugs that are actually unrelated to any concrete branch name.\n      \n     -    Therefore, the actual branch name does not matter at all. We might just\n     -    as well avoid racially-charged names here.\n     +    The first bug was fixed in 85fe0e800ca (config: work around bug with\n     +    includeif:onbranch and early config, 2019-07-31). Essentially, when\n     +    reading early config, there would be a catch-22 trying to access the\n     +    refs, and therefore we simply cannot evaluate the condition at that\n     +    point. The test case ensures that we avoid emitting this bogus message:\n     +\n     +            BUG: refs.c:1851: attempting to get main_ref_store outside of repository\n     +\n     +    The second test case concerns the non-Git scenario, where we simply do\n     +    not have a current branch to begin with (because we don't have a\n     +    repository in the first place), and the test case was introduced in\n     +    22932d9169f (config: stop checking whether the_repository is NULL,\n     +    2019-08-06) to ensure that we don't cause a segmentation fault should\n     +    the code still incorrectly try to look at any ref.\n     +\n     +    In short, neither of these two test cases will ever look at a current\n     +    branch name, even in case of regressions. Therefore, the actual branch\n     +    name does not matter at all. We can therefore easily avoid\n     +    racially-charged branch names here, and that's what this patch does.\n      \n          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n      \n\n\n t/t1309-early-config.sh | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t1309-early-config.sh b/t/t1309-early-config.sh\nindex ebb8e1aecb..b4a9158307 100755\n--- a/t/t1309-early-config.sh\n+++ b/t/t1309-early-config.sh\n@@ -91,11 +91,11 @@ test_expect_failure 'ignore .git/ with invalid config' '\n \n test_expect_success 'early config and onbranch' '\n \techo \"[broken\" >broken &&\n-\ttest_with_config \"[includeif \\\"onbranch:master\\\"]path=../broken\"\n+\ttest_with_config \"[includeif \\\"onbranch:topic\\\"]path=../broken\"\n '\n \n test_expect_success 'onbranch config outside of git repo' '\n-\ttest_config_global includeIf.onbranch:master.path non-existent &&\n+\ttest_config_global includeIf.onbranch:topic.path non-existent &&\n \tnongit git help\n '\n \n\nbase-commit: e31aba42fb12bdeb0f850829e008e1e3f43af500\n-- \ngitgitgadget\n"}]}