Oops, the comment told us to watch out for this. Fixes: 56e53a49e28f ("dim: declare and assign separately") Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> --- dim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dim b/dim index c1ac9e546ea9..ddcc18f17f0d 100755 --- a/dim +++ b/dim @@ -1091,10 +1091,7 @@ function checkpatch_commit git --no-pager log --oneline -1 $commit $cmd | scripts/checkpatch.pl -q --emacs --strict - || true - # FIXME: this relies on local assignment not failing on command - # substitution failures - bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG') - if test "$bug_lines" -eq 1; then + if bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG') && [[ "$bug_lines" = "1" ]]; then warn_or_fail "New BUG macro added" fi -- 2.1.4 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx