git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 5 in “t4013: prepare for the new default branch name "main"”
  1. t4013: prepare for the new default branch name "main"Johannes Schindelin via GitGitGadget, Nov 8, 2020
  2. Johannes SchindelinNov 11, 2020
  3. Junio C HamanoNov 11, 2020
  4. Johannes SchindelinNov 12, 2020
  5. Junio C HamanoNov 12, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.