Git doesn't know about untracked files, so we should avoid modifying
them when we adjust permissions in the post-checkout hook. Add an
option to our invocation of git ls-files that controls the use of the
--others flag (which controls listing untracked files), and disable it
when we're looking for files to process with the post-checkout hook.
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'
When we get paths from git.GetAttributePaths, the paths are in the
system native format; that is, they use the system native path
separator. However, when creating patterns, we always want to use a
slash. As things stand right now, lockable patterns that use a slash
never match on Windows.
Convert the patterns to use a slash so that lockable patterns work as
expected on Windows.