diff --git a/t/t-fsck.sh b/t/t-fsck.sh index 830791de..64f4b6a1 100755 --- a/t/t-fsck.sh +++ b/t/t-fsck.sh @@ -98,6 +98,30 @@ begin_test "fsck dry run" ) end_test +begin_test "fsck does not fail with shell characters in paths" +( + set -e + + mkdir '[[path]]' + cd '[[path]]' + reponame="fsck-shell-paths" + git init $reponame + cd $reponame + + # Create a commit with some files tracked by git-lfs + git lfs track *.dat + echo "test data" > a.dat + echo "test data 2" > b.dat + git add .gitattributes *.dat + git commit -m "first commit" + + # Verify that the pack code handles glob patterns properly. + git gc --aggressive --prune=now + + [ "Git LFS fsck OK" = "$(git lfs fsck)" ] +) +end_test + begin_test "fsck: outside git repository" ( set +e