t: add a test for shell characters in paths
Now that we've included gitobj v1.4.1, add a test for the failure case we had in the past to prevent us from regressing this behavior. Check that shell characters within a pathname don't cause a failure when we open the pack file. Choose brackets since these are available on all platforms, including Windows.
This commit is contained in:
parent
f65985a1c9
commit
c384de075c
24
t/t-fsck.sh
24
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
|
||||
|
Loading…
Reference in New Issue
Block a user