Currently, our default branch in tests is "master". This is the Git
default, but the Git default will likely change in the future, so it
makes sense to update our testsuite to be explicit about the branch
name. We'll ensure this continues by building against older versions of
Git as well as newer versions.
We use "main" for the new branch name, since that's the proposed value
upstream.
This commit was made entirely by automated means using the following
command:
git grep -l master t | xargs sed -i -e 's/master/main/g'
In future versions of Git, the default branch name will likely change
from "master" to "main". We'd like to make this change as well. In
order to make the default branch the same in all versions of Git, let's
use a template directory to initialize the repositories that we're
creating. This works with Git 1.8.3.1, which is available in CentOS 7,
as well as all newer versions.
For now, we set the branch name to "master", but in a future commit,
we'll change the name to "main".
We move the native_path helper into testenv.sh so that we can
canonicalize the GIT_TEMPLATE_PATH environment variable. Git itself
canonicalizes this internally and the tests for git lfs env will fail if
we don't canonicalize it ourselves.