Re: [PATCH] t4013: prepare for the new default branch name "main"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Junio,

On Wed, 11 Nov 2020, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@xxxxxx> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux