1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#!/usr/bin/env bash
. "$(dirname "$0")/testlib.sh"
begin_test "repository format version"
(
set -e
reponame="lfs-repo-version"
git init $reponame
cd $reponame
[ -z "$(git config --local lfs.repositoryFormatVersion)" ]
git lfs track '*.dat'
[ "$(git config --local lfs.repositoryFormatVersion)" = "0" ]
git config --local lfs.repositoryFormatVersion 1
git lfs track '*.bin' >output 2>&1 && exit 1
cat output
grep "Unknown repository format version: 1" output
git config --local --unset lfs.repositoryFormatVersion
# Verify that global settings are ignored.
git config --global lfs.repositoryFormatVersion 1
git lfs track '*.bin'
)
end_test
|