Skip to content

Commit fac6cfe

Browse files
author
MarcoFalke
committed
lint: commit-script-check.sh: echo to stderr
1 parent 5fb9455 commit fac6cfe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/lint/commit-script-check.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ for commit in $(git rev-list --reverse "$1"); do
3535
git checkout --quiet "$commit"^ || exit
3636
SCRIPT="$(git rev-list --format=%b -n1 "$commit" | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d')"
3737
if test -z "$SCRIPT"; then
38-
echo "Error: missing script for: $commit"
39-
echo "Failed"
38+
echo "Error: missing script for: $commit" >&2
39+
echo "Failed" >&2
4040
RET=1
4141
else
42-
echo "Running script for: $commit"
43-
echo "$SCRIPT"
42+
echo "Running script for: $commit" >&2
43+
echo "$SCRIPT" >&2
4444
(eval "$SCRIPT")
45-
git --no-pager diff --exit-code "$commit" && echo "OK" || (echo "Failed"; false) || RET=1
45+
git --no-pager diff --exit-code "$commit" && echo "OK" >&2 || (echo "Failed" >&2; false) || RET=1
4646
fi
4747
git reset --quiet --hard HEAD
4848
else
4949
if git rev-list "--format=%b" -n1 "$commit" | grep -q '^-\(BEGIN\|END\)[ a-zA-Z]*-$'; then
50-
echo "Error: script block marker but no scripted-diff in title of commit $commit"
51-
echo "Failed"
50+
echo "Error: script block marker but no scripted-diff in title of commit $commit" >&2
51+
echo "Failed" >&2
5252
RET=1
5353
fi
5454
fi

0 commit comments

Comments
 (0)