Skip to content

Commit fcf6937

Browse files
authored
Updated pre-commit feedback (#13)
Removed backticks and shortened feedback
1 parent 3e91c88 commit fcf6937

1 file changed

Lines changed: 10 additions & 20 deletions

File tree

scripts/pre-commit

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ git -c diff.renames=false diff --cached --name-only --diff-filter=A -z $against
2828
if [ "$ext" = "meta" ]; then
2929
if [ $(git ls-files --cached -- "$base" | wc -l) = 0 ]; then
3030
cat <<EOF
31-
Error: Redudant meta file.
32-
33-
Meta file \`$f' is added, but \`$base' is not in the git index.
34-
35-
Please add \`$base' to git as well.
31+
Error: Redudant meta file. Meta file '$f' is added, but '$base' is not in the git index.
32+
Please add '$base' to git as well.
3633
EOF
3734
exit 1
3835
fi
@@ -41,11 +38,9 @@ EOF
4138
while [ "$p" != "$ASSETS_DIR" ]; do
4239
if [ $(git ls-files --cached -- "$p.meta" | wc -l) = 0 ]; then
4340
cat <<EOF
44-
Error: Missing meta file.
45-
46-
Asset \`$f' is added, but \`$p.meta' is not in the git index.
47-
48-
Please add \`$p.meta' to git as well.
41+
Error: Missing meta file. Asset '$f' is added, but '$p.meta' is not in the git index.
42+
Please add '$p.meta' to git as well by typing the following:
43+
git add '$p.meta'
4944
EOF
5045
exit 1
5146
fi
@@ -66,11 +61,8 @@ git -c diff.renames=false diff --cached --name-only --diff-filter=D -z $against
6661
if [ "$ext" = "meta" ]; then
6762
if [ $(git ls-files --cached -- "$base" | wc -l) != 0 ]; then
6863
cat <<EOF
69-
Error: Missing meta file.
70-
71-
Meta file \`$f' is removed, but \`$base' is still in the git index.
72-
73-
Please revert the beta file or remove the asset file.
64+
Error: Missing meta file. Meta file '$f' is removed, but '$base' is still in the git index.
65+
Please revert the meta file or remove the asset file.
7466
EOF
7567
exit 1
7668
fi
@@ -79,11 +71,9 @@ EOF
7971
while [ "$p" != "$ASSETS_DIR" ]; do
8072
if [ $(git ls-files --cached -- "$p" | wc -l) = 0 ] && [ $(git ls-files --cached -- "$p.meta" | wc -l) != 0 ]; then
8173
cat <<EOF
82-
Error: Redudant meta file.
83-
84-
Asset \`$f' is removed, but \`$p.meta' is still in the git index.
85-
86-
Please remove \`$p.meta' from git as well.
74+
Error: Redudant meta file. Asset '$f' is removed, but '$p.meta' is still in the git index.
75+
Please remove '$p.meta' from git as well by typing the following:
76+
git rm '$p.meta'
8777
EOF
8878
exit 1
8979
fi

0 commit comments

Comments
 (0)