git lfs ls-files -I 过滤器不适用于非 ASCII 文件夹名称

git lfs ls-files -I filter doesn't work with non-ASCII folder names

git lfs ls-files -I 过滤器似乎不适用于非 ASCII 文件夹名称,即使过滤器以八进制编码传递,也可以通过下面的 bash 脚本确认:

mkdir LfsTestRepo
cd LfsTestRepo
git init
git lfs -v # git-lfs/2.7.2 (GitHub; windows amd64; go 1.12.2; git 08a08ae0)
git lfs install
echo "*.dll filter=lfs diff=lfs merge=lfs -text" > .gitattributes
# ASCII
mkdir "A B"
echo "some binary data" > "A B/C.dll" 
# Non-ASCII
mkdir "А Б"
echo "some binary data" > "А Б/В.dll" 
git add --all
git commit -m "DLLs added"

git lfs ls-files # Shows both files
git lfs ls-files -I "/A B/*" # ASCII - shows the file with folder filter
git lfs ls-files -I "/А Б/*" # Non-ASCII - doesn't show the file with folder filter

git ls-files -s ":(attr:filter=lfs)А Б" # Non-ASCII native ls-files shows the file (octal encoding)

git lfs ls-files -I "/00 01/*" # Non-ASCII - doesn't show the file even with octal encoding

虽然在我们的特定案例中,可能永远不会遇到包含非 ASCII 字符的文件夹,但这仍然是一个小麻烦,并且是一个潜在的有效用例。

所以,我做错了什么,还是只是 git lfs ls-files -I 不支持非 ASCII 字符的过滤器?

目前,使用非 ASCII 字符指定带有 -I 的文件名已损坏。有一个 open pull request 来修复它,它将包含在 Git LFS 2.9.0.