9e006ac4e2
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'
30 lines
563 B
Bash
Executable File
30 lines
563 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
. "$(dirname "$0")/testlib.sh"
|
|
|
|
reponame="$(basename "$0" ".sh")"
|
|
|
|
# Leading dashes may be misinterpreted as flags if commands don't use "--"
|
|
# before paths.
|
|
name1='-dash.dat'
|
|
contents1='leading dash'
|
|
|
|
begin_test "push unusually named files"
|
|
(
|
|
set -e
|
|
|
|
setup_remote_repo "$reponame"
|
|
|
|
clone_repo "$reponame" repo
|
|
|
|
git lfs track "*.dat"
|
|
echo "$content1" > "$name1"
|
|
|
|
git add -- .gitattributes *.dat
|
|
git commit -m "add files"
|
|
|
|
git push origin main | tee push.log
|
|
grep "Uploading LFS objects: 100% (1/1), 1 B" push.log
|
|
)
|
|
end_test
|