All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH maintainer-tools 1/2] dim: Use -e on warn_or_fail to allow fo newlines
@ 2016-04-28 11:32 Joonas Lahtinen
  2016-04-28 11:32 ` [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915 Joonas Lahtinen
  0 siblings, 1 reply; 4+ messages in thread
From: Joonas Lahtinen @ 2016-04-28 11:32 UTC (permalink / raw)
  To: Intel graphics driver community testing & development; +Cc: Daniel Vetter

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

diff --git a/dim b/dim
index d9c1be5..dbcb7d9 100755
--- a/dim
+++ b/dim
@@ -118,9 +118,9 @@ HELP=
 function warn_or_fail
 {
 	if [[ $FORCE ]] ; then
-		echo WARNING: $1, but continuing
+		echo -e WARNING: $1, but continuing
 	else
-		echo ERROR: $1, aborting
+		echo -e ERROR: $1, aborting
 		exit 1
 	fi
 }
-- 
2.5.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915
  2016-04-28 11:32 [PATCH maintainer-tools 1/2] dim: Use -e on warn_or_fail to allow fo newlines Joonas Lahtinen
@ 2016-04-28 11:32 ` Joonas Lahtinen
  2016-04-28 12:47   ` Jani Nikula
  2016-04-28 14:04   ` Daniel Vetter
  0 siblings, 2 replies; 4+ messages in thread
From: Joonas Lahtinen @ 2016-04-28 11:32 UTC (permalink / raw)
  To: Intel graphics driver community testing & development; +Cc: Daniel Vetter

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 dim | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dim b/dim
index dbcb7d9..1c258be 100755
--- a/dim
+++ b/dim
@@ -691,6 +691,11 @@ function checkpatch_commit
 	if test "$bug_lines" -eq 1; then
 		warn_or_fail "New BUG macro added"
 	fi
+
+	local non_i915_files=$(git diff-tree --no-commit-id --name-only -r HEAD | grep -v "^\(drivers/gpu/drm/i915/\|include/drm/i915\|include/uapi/drm/i915\)")
+	if [ -n "$non_i915_files" ]; then
+		warn_or_fail "The following files are outside of i915 maintenance scope:\n$non_i915_files\n\nConfirm you have appropriate Acked-by and Reviewed-by for above files"
+	fi
 }
 
 # turn $1 in to a git commit range
-- 
2.5.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915
  2016-04-28 11:32 ` [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915 Joonas Lahtinen
@ 2016-04-28 12:47   ` Jani Nikula
  2016-04-28 14:04   ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Jani Nikula @ 2016-04-28 12:47 UTC (permalink / raw)
  To: Joonas Lahtinen,
	Intel graphics driver community testing & development
  Cc: Daniel Vetter

On Thu, 28 Apr 2016, Joonas Lahtinen <joonas.lahtinen@linux.intel.com> wrote:
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  dim | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/dim b/dim
> index dbcb7d9..1c258be 100755
> --- a/dim
> +++ b/dim
> @@ -691,6 +691,11 @@ function checkpatch_commit
>  	if test "$bug_lines" -eq 1; then
>  		warn_or_fail "New BUG macro added"
>  	fi
> +
> +	local non_i915_files=$(git diff-tree --no-commit-id --name-only -r HEAD | grep -v "^\(drivers/gpu/drm/i915/\|include/drm/i915\|include/uapi/drm/i915\)")
> +	if [ -n "$non_i915_files" ]; then
> +		warn_or_fail "The following files are outside of i915 maintenance scope:\n$non_i915_files\n\nConfirm you have appropriate Acked-by and Reviewed-by for above files"
> +	fi

So the original idea beind using warn_or_fail in checkpatch was that it
would get run *before* git am, therefore actually preventing the patch
from being applied. This is no longer the case, because checkpatch fails
to parse base64 encoded emails. Email is hard, so we offload all of that
to git am instead, and check the patch-turned-commit using git show
--pretty=email.

All I'm saying is that the existing use of warn_or_fail in
checkpatch_commit is silly, and adding new ones even more so. I'd just
turn them to direct echos that mimic checkpatch output, with WARNING or
CHECK prefix.

BR,
Jani.


>  }
>  
>  # turn $1 in to a git commit range

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915
  2016-04-28 11:32 ` [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915 Joonas Lahtinen
  2016-04-28 12:47   ` Jani Nikula
@ 2016-04-28 14:04   ` Daniel Vetter
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2016-04-28 14:04 UTC (permalink / raw)
  To: Joonas Lahtinen
  Cc: Daniel Vetter, Intel graphics driver community testing & development

On Thu, Apr 28, 2016 at 02:32:20PM +0300, Joonas Lahtinen wrote:
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> ---
>  dim | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/dim b/dim
> index dbcb7d9..1c258be 100755
> --- a/dim
> +++ b/dim
> @@ -691,6 +691,11 @@ function checkpatch_commit
>  	if test "$bug_lines" -eq 1; then
>  		warn_or_fail "New BUG macro added"
>  	fi
> +
> +	local non_i915_files=$(git diff-tree --no-commit-id --name-only -r HEAD | grep -v "^\(drivers/gpu/drm/i915/\|include/drm/i915\|include/uapi/drm/i915\)")
> +	if [ -n "$non_i915_files" ]; then
> +		warn_or_fail "The following files are outside of i915 maintenance scope:\n$non_i915_files\n\nConfirm you have appropriate Acked-by and Reviewed-by for above files"
> +	fi
>  }

You need to restrict this to the drm-intel-next-queued branch. And I think
asking the user instead of warn_or_fail would be nice, but not directly
needed. Otherwise lgtm for both patches.
-Daniel

>  
>  # turn $1 in to a git commit range
> -- 
> 2.5.5
> 

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

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

end of thread, other threads:[~2016-04-28 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28 11:32 [PATCH maintainer-tools 1/2] dim: Use -e on warn_or_fail to allow fo newlines Joonas Lahtinen
2016-04-28 11:32 ` [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915 Joonas Lahtinen
2016-04-28 12:47   ` Jani Nikula
2016-04-28 14:04   ` 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.