2015-07-30 02:37:31 +00:00
|
|
|
#!/usr/bin/env bash
|
2015-05-26 17:51:38 +00:00
|
|
|
|
|
|
|
. "test/testlib.sh"
|
|
|
|
|
|
|
|
begin_test "ls-files"
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mkdir repo
|
|
|
|
cd repo
|
|
|
|
git init
|
|
|
|
git lfs track "*.dat" | grep "Tracking \*.dat"
|
|
|
|
echo "some data" > some.dat
|
|
|
|
echo "some text" > some.txt
|
2015-07-05 18:13:01 +00:00
|
|
|
echo "missing" > missing.dat
|
|
|
|
git add missing.dat
|
|
|
|
git commit -m "add missing file"
|
|
|
|
[ "missing.dat" = "$(git lfs ls-files)" ]
|
|
|
|
|
|
|
|
git rm missing.dat
|
2015-05-26 17:51:38 +00:00
|
|
|
git add some.dat some.txt
|
2015-07-05 18:13:01 +00:00
|
|
|
git commit -m "added some files, removed missing one"
|
2015-05-26 17:51:38 +00:00
|
|
|
|
2015-07-05 18:13:01 +00:00
|
|
|
git lfs ls-files | tee ls.log
|
|
|
|
grep some.dat ls.log
|
2015-07-06 17:33:30 +00:00
|
|
|
[ `wc -l < ls.log` = 1 ]
|
2015-05-26 17:51:38 +00:00
|
|
|
)
|
|
|
|
end_test
|