Skip to content

Commit e891163

Browse files
committed
Fix a bug in check-copyright.
1 parent 9b14aa4 commit e891163

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

caca/t/check-copyright

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ for dir in $(make -s echo-dirs -C "${top_srcdir}"); do
2020
if ! grep 'Copyright *([cC])' "${top_srcdir}/${dir}/$x" >/dev/null 2>&1; then
2121
echo "error: ${dir}/$x lacks proper copyright information"
2222
nfails=$(($nfails + 1))
23-
elif [ -d ../../.git ]; then
23+
elif [ -d "${top_srcdir}/.git" ]; then
2424
Y="$(git log "${top_srcdir}/${dir}/$x" | head -n 3 | sed -ne 's/^Date.* \([0-9][0-9][0-9][0-9]\) .*/\1/p')"
2525
if [ "$Y" != "" ]; then
2626
if ! grep "$Y.*@" "${top_srcdir}/${dir}/$x" >/dev/null 2>&1; then
27-
echo "error: ${dir}/$x last modified in $Y, which is not in copyright"
27+
echo "error: ${top_srcdir}/${dir}/$x last modified in $Y, which is not in copyright"
28+
git branch -a | sed 's/^/info: /'
29+
git log --stat "${top_srcdir}/${dir}/$x" | sed 's/^/info: /'
2830
nfails=$(($nfails + 1))
2931
fi
3032
fi

0 commit comments

Comments
 (0)