3 Star 12 Fork 2

Git工具集/git-lfs

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
t-ext.sh 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
. "$(dirname "$0")/testlib.sh"
begin_test "ext"
(
set -e
# no need to setup a remote repo, since this test does not need to push or pull
mkdir ext
cd ext
git init
git config lfs.extension.foo.clean "foo-clean %f"
git config lfs.extension.foo.smudge "foo-smudge %f"
git config lfs.extension.foo.priority 0
git config lfs.extension.bar.clean "bar-clean %f"
git config lfs.extension.bar.smudge "bar-smudge %f"
git config lfs.extension.bar.priority 1
git config lfs.extension.baz.clean "baz-clean %f"
git config lfs.extension.baz.smudge "baz-smudge %f"
git config lfs.extension.baz.priority 2
fooExpected="Extension: foo
clean = foo-clean %f
smudge = foo-smudge %f
priority = 0"
barExpected="Extension: bar
clean = bar-clean %f
smudge = bar-smudge %f
priority = 1"
bazExpected="Extension: baz
clean = baz-clean %f
smudge = baz-smudge %f
priority = 2"
actual=$(git lfs ext list foo)
[ "$actual" = "$fooExpected" ]
actual=$(git lfs ext list bar)
[ "$actual" = "$barExpected" ]
actual=$(git lfs ext list baz)
[ "$actual" = "$bazExpected" ]
actual=$(git lfs ext list foo bar)
expected=$(printf "%s\n%s" "$fooExpected" "$barExpected")
[ "$actual" = "$expected" ]
actual=$(git lfs ext list)
expected=$(printf "%s\n%s\n%s" "$fooExpected" "$barExpected" "$bazExpected")
[ "$actual" = "$expected" ]
actual=$(git lfs ext)
[ "$actual" = "$expected" ]
)
end_test
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/vcs-all-in-one/git-lfs.git
git@gitee.com:vcs-all-in-one/git-lfs.git
vcs-all-in-one
git-lfs
git-lfs
master

搜索帮助