| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | . "$(dirname "$0")/testlib.sh" |
| 4 | |
| 5 | begin_test "push a file with the same name as a branch" |
| 6 | ( |
| 7 | set -e |
| 8 | |
| 9 | reponame="$(basename "$0" ".sh")" |
| 10 | setup_remote_repo "$reponame" |
| 11 | clone_repo "$reponame" repo |
| 12 | |
| 13 | git lfs track "main" |
| 14 | echo "main" > main |
| 15 | git add .gitattributes main |
| 16 | git commit -m "add main" |
| 17 | |
| 18 | git lfs push --all origin main 2>&1 | tee push.log |
| 19 | grep "Uploading LFS objects: 100% (1/1), [0-9] B" push.log |
| 20 | ) |
| 21 | end_test |