Skip to content

pr-783/dscho/prepare-for-main-branch-t4013-v1

From: Johannes Schindelin <johannes.schindelin@gmx.de>

This patch is a bit involved, mainly because the default branch name is
not only hard-coded in the script `t4013-diff-various.sh` itself, and
not only in the support files in `t/t4013/`, but also in the _file
names_ in `t/t4013/`.

The trick to adjust this test script was performed by inserting the
definition GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main at the beginning of
the test script, and then running these commands:

(cd t &&
 sed -i 's/master/main/g' -- \
	$(git grep -l master HEAD -- ./t4013\* | sed 's/HEAD://'))

and

eval "$(git ls-files t/t4013/ | sed -n \
	-e 's/\(.*\)master\(.*\)master\(.*\)/git mv & \1main\2main\3;/p')"

and

eval "$(git ls-files t/t4013/ | sed -n \
	-e 's/\(.*\)master\(.*\)/git mv & \1main\2;/p')"

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Submitted-As: https://lore.kernel.org/git/pull.783.git.1604829561838.gitgitgadget@gmail.com
Assets 2