Re: [dim PATCH 1/7] dim: don't fail on grep not matching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 23, 2017 at 12:06:16PM +0200, Jani Nikula wrote:
> Oops, the comment told us to watch out for this.
> 
> Fixes: 56e53a49e28f ("dim: declare and assign separately")

I just hacked around this with a || true :-)

Ack.
-Daniel

> 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

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux