File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,14 @@ ALL_FILES=''
2929ONLY_CHANGED=' '
3030FILES=()
3131if (( $# == 0 )) ; then
32- if [[ -n " $( git status --porcelain) " ]]; then
33- echo ' Detected uncommitted changes. Please commit or stash them before running format.sh. ' >&2
32+ if [[ -n " $( git status --porcelain --ignore-submodules --untracked-files=no ) " ]]; then
33+ echo " Detected uncommitted changes. Please commit or stash them before running $0 . " >&2
3434 exit 1
3535 fi
3636 ONLY_CHANGED=' true'
3737else
3838 while (( $# > 0 )) ; do
39- case $1 in
39+ case " $1 " in
4040 --files)
4141 shift
4242 while (( $# > 0 )) ; do
@@ -88,11 +88,6 @@ if ! python3 -m pre_commit --version &>/dev/null; then
8888 python3 -m pip install pre-commit
8989fi
9090
91- if [[ ! -f " ${ROOT} /.git/hooks/pre-commit" ]]; then
92- echo " Installing and initializing pre-commit hooks..."
93- python3 -m pre_commit install --install-hooks
94- fi
95-
9691echo ' tile-lang pre-commit: Check Start'
9792
9893if [[ -n " ${ALL_FILES} " ]]; then
You can’t perform that action at this time.
0 commit comments