diff mbox

dim: Improve the error output when rebuild-nightly fails

Message ID 20161111132131.25403-1-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Nov. 11, 2016, 1:21 p.m. UTC
Joonas rightly complained that the current output is useless and just
confuses.

Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Jani Nikula Nov. 11, 2016, 1:37 p.m. UTC | #1
On Fri, 11 Nov 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Joonas rightly complained that the current output is useless and just
> confuses.
>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  dim | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/dim b/dim
> index dcdc19a9c82d..eba20509cda8 100755
> --- a/dim
> +++ b/dim
> @@ -325,9 +325,11 @@ function update_linux_next # branch next next-fixes fixes
>  
>  function check_conflicts
>  {
> -	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' ; then
> +	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' &> /dev/null ; then

grep -q instead of redirecting to /dev/null?

>  		if [ -n "$1" ]; then
> -			echo $*
> +			echoerr $*
> +			echoerr "See the section \"Resolving Conflicts when Rebuilding drm-intel-nightly\""
> +			echoerr "in the drm-intel.rst documentation for how to handle this situation."
>  		fi
>  		exit 1
>  	fi
Daniel Vetter Nov. 11, 2016, 4:10 p.m. UTC | #2
On Fri, Nov 11, 2016 at 03:37:04PM +0200, Jani Nikula wrote:
> On Fri, 11 Nov 2016, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Joonas rightly complained that the current output is useless and just
> > confuses.
> >
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  dim | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/dim b/dim
> > index dcdc19a9c82d..eba20509cda8 100755
> > --- a/dim
> > +++ b/dim
> > @@ -325,9 +325,11 @@ function update_linux_next # branch next next-fixes fixes
> >  
> >  function check_conflicts
> >  {
> > -	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' ; then
> > +	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' &> /dev/null ; then
> 
> grep -q instead of redirecting to /dev/null?

Will do.
-Daniel

> 
> >  		if [ -n "$1" ]; then
> > -			echo $*
> > +			echoerr $*
> > +			echoerr "See the section \"Resolving Conflicts when Rebuilding drm-intel-nightly\""
> > +			echoerr "in the drm-intel.rst documentation for how to handle this situation."
> >  		fi
> >  		exit 1
> >  	fi
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
diff mbox

Patch

diff --git a/dim b/dim
index dcdc19a9c82d..eba20509cda8 100755
--- a/dim
+++ b/dim
@@ -325,9 +325,11 @@  function update_linux_next # branch next next-fixes fixes
 
 function check_conflicts
 {
-	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' ; then
+	if git diff | grep '\(<<<<<<<\|=======\|>>>>>>>\||||||||\)' &> /dev/null ; then
 		if [ -n "$1" ]; then
-			echo $*
+			echoerr $*
+			echoerr "See the section \"Resolving Conflicts when Rebuilding drm-intel-nightly\""
+			echoerr "in the drm-intel.rst documentation for how to handle this situation."
 		fi
 		exit 1
 	fi