Add tests for status before first commit

This commit is contained in:
Steve Streeting 2016-09-26 16:21:04 +01:00
parent 929f239612
commit da4b9efede

@ -83,3 +83,29 @@ begin_test "status: outside git repository"
grep "Not in a git repository" status.log
)
end_test
begin_test "status - before initial commit"
(
set -e
git init repo-initial
cd repo-initial
git lfs track "*.dat"
# should not fail when nothing to display (ignore output, will be blank)
git lfs status
echo "some data" > file1.dat
git add file1.dat
expected="
Git LFS objects to be committed:
file1.dat (10 B)
Git LFS objects not staged for commit:"
[ "$expected" = "$(git lfs status)" ]
)
end_test