All of lore.kernel.org
 help / color / mirror / Atom feed
* [dim PATCH 1/7] dim: don't fail on grep not matching
@ 2017-03-23 10:06 Jani Nikula
  2017-03-23 10:06 ` [dim PATCH 2/7] dim: abstract and fix maintainer scope check for dinq Jani Nikula
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Jani Nikula @ 2017-03-23 10:06 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Oops, the comment told us to watch out for this.

Fixes: 56e53a49e28f ("dim: declare and assign separately")
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-03-23 14:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-23 10:06 [dim PATCH 1/7] dim: don't fail on grep not matching Jani Nikula
2017-03-23 10:06 ` [dim PATCH 2/7] dim: abstract and fix maintainer scope check for dinq Jani Nikula
2017-03-23 10:06 ` [dim PATCH 3/7] dim: only issue warnings on new BUG macros Jani Nikula
2017-03-23 10:06 ` [dim PATCH 4/7] dim: return exit code from checkpatch_commit Jani Nikula
2017-03-23 10:06 ` [dim PATCH 5/7] dim: make dim checkpatch subcommand return exit codes Jani Nikula
2017-03-23 10:06 ` [dim PATCH 6/7] dim: make dim apply-branch " Jani Nikula
2017-03-23 10:06 ` [dim PATCH 7/7] dim: propagate errors from check_maintainer Jani Nikula
2017-03-23 14:33   ` Daniel Vetter
2017-03-23 14:31 ` [dim PATCH 1/7] dim: don't fail on grep not matching Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.