Re: [PATCH 1/9] init: allow overriding the default branch name for new repositories
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 11, 2020, 23:14 UTC
- Message-ID
- <xmqqwo4di49l.fsf@gitster.c.googlers.com>
- In-Reply-To
- <08e46af3-ff52-8bce-b75a-db8c390c9641@gmail.com>
Alban Gruin <alban.gruin@gmail.com> writes:
Show 5 quoted lines
> Why adding yet another environment variable instead of relying only on a > config option? I understand it's for the tests, but can't we add a > shell function in test-lib.sh (and friends) that tries to read > `GIT_TEST_DEFAULT_BRANCH_NAME', and, if it exists, sets > `core.defaultBranchName'?
Can you produce such a patch that does it cleanly? My knee jerk reaction is that I would suspect that you end up having to touch many places in the t/ scripts, but if you prove otherwise, that would certainly be appreciated.
And no,
git () { command git -c core.defaultBranchName=master "$@" }is not an acceptable solution.