From: Jani Nikula <jani.nikula@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Intel graphics driver community testing & development
<intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH maintainer-tools 2/2] dim: Refuse to commit patches that modify files outside of i915
Date: Thu, 28 Apr 2016 15:47:57 +0300 [thread overview]
Message-ID: <87shy5hpc2.fsf@intel.com> (raw)
In-Reply-To: <1461843140-19122-2-git-send-email-joonas.lahtinen@linux.intel.com>
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
next prev parent reply other threads:[~2016-04-28 12:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-04-28 14:04 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87shy5hpc2.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox