mirror of
https://github.com/actions/checkout.git
synced 2024-10-12 14:21:48 +03:00
c533a0a4cf
* added filter option & tests * added build file * fix test oversight * added exit 1 * updated docs to specify override * undo unneeded readme change * set to undefined rather than empty string * run git config in correct di --------- Co-authored-by: Cory Miller <13227161+cory-miller@users.noreply.github.com>
17 lines
445 B
Bash
Executable File
17 lines
445 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Verify .git folder
|
|
if [ ! -d "./fetch-filter/.git" ]; then
|
|
echo "Expected ./fetch-filter/.git folder to exist"
|
|
exit 1
|
|
fi
|
|
|
|
# Verify .git/config contains partialclonefilter
|
|
|
|
CLONE_FILTER=$(git -C fetch-filter config --local --get remote.origin.partialclonefilter)
|
|
|
|
if [ "$CLONE_FILTER" != "blob:none" ]; then
|
|
echo "Expected ./fetch-filter/.git/config to have 'remote.origin.partialclonefilter' set to 'blob:none'"
|
|
exit 1
|
|
fi
|