Re: [PATCH] t4013: prepare for the new default branch name "main"
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 12, 2020, 13:48 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2011121443100.18437@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqsg9f36nu.fsf@gitster.c.googlers.com>
Hi Junio,
On Wed, 11 Nov 2020, Junio C Hamano wrote:
Show 13 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > Could you advise how I could help advance this patch further? This is the > > last patch I need that is not in `next` to get to the patch series that > > actually flips the default of `init.defaultBranch` to `main` (see > > https://github.com/gitgitgadget/git/pull/762). > > Is it an option to add > > git config --global init.defaultBranchName master > > at the very beginning of the test script without making any other > change?
Unfortunately not because at that stage, `HOME` is still not overridden. It will be overridden in `test-lib.sh`. Which is also where the initial repository (and hence, the initial branch) will be created.
So: the suggested command with work neither before `. test-lib.sh` nor after it.
I understand the desire to leave t4013 alone for the moment. If that's what you want, I can send off a patch series that _specificall_ excludes t4013, and will the follow up with a pair of patches that ties up that loose end.
Sound good?
> After all, we may want to avoid 'slave' but 'master' by itself is > not all that bad, especially given that it is used only in the test > script. If we were to have "does the configuration variable work > OK?" test somewhere anyway, why not make it this test?
What's wrong with the test cases in t0001-init.sh that are labeled 'overridden default initial branch name (config)', 'overridden default main branch name (env)' and 'invalid default branch name', i.e. https://github.com/git/git/blob/e31aba42fb/t/t0001-init.sh#L554-L572?
Thanks, Dscho