2f356f52cdf8cf4022c2dc2063b33f81219ee86a
[scm/test.git] / test / test-unusual-filenames.sh
1 #!/usr/bin/env bash
2
3 . "test/testlib.sh"
4
5 reponame="$(basename "$0" ".sh")"
6
7 # Leading dashes may be misinterpreted as flags if commands don't use "--"
8 # before paths.
9 name1='-dash.dat'
10 contents1='leading dash'
11
12 begin_test "push unusually named files"
13 (
14   set -e
15
16   setup_remote_repo "$reponame"
17
18   clone_repo "$reponame" repo
19
20   git lfs track "*.dat"
21   echo "$content1" > "$name1"
22
23   git add -- .gitattributes *.dat
24   git commit -m "add files"
25
26   git push origin master | tee push.log
27   grep "Uploading LFS objects: 100% (1/1), 1 B" push.log
28 )
29 end_test