[PATCH 3/5] dim: shut up sed broken pipe noise in apply-pull

Jani Nikula jani.nikula at linux.intel.com
Fri May 4 14:11:08 UTC 2018


On Fri, 04 May 2018, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> "head" immediately closes its stdin, which upsets sed. Shut it up.

I don't understand this, care to expand? Can't review stuff I don't
understand. :p

BR,
Jani.

>
> Cc: Dave Airlie <airlied at gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  dim | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dim b/dim
> index 97b4f8d1531b..010dd2001254 100755
> --- a/dim
> +++ b/dim
> @@ -915,7 +915,7 @@ function dim_apply_pull
>  
>  	cat > $file
>  
> -	pull_branch=$(sed -e '0,/[gG]it repository at:$/d' $file | head -n 2 | tail -n 1)
> +	pull_branch=$(sed -e '0,/[gG]it repository at:$/d' $file 2> /dev/null | head -n 2 | tail -n 1)
>  
>  	if [[ -z "$pull_branch" ]] ; then
>  		echoerr "no pull request found"

-- 
Jani Nikula, Intel Open Source Technology Center


More information about the dim-tools mailing list