From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [dim PATCH v2 3/7] dim: do not do local variable assignments in declaration
Date: Thu, 24 Nov 2016 17:37:46 +0200 [thread overview]
Message-ID: <87bmx4vqgl.fsf@intel.com> (raw)
In-Reply-To: <1480001560-18790-3-git-send-email-jani.nikula@intel.com>
On Thu, 24 Nov 2016, Jani Nikula <jani.nikula@intel.com> wrote:
> @@ -852,18 +876,24 @@ function dim_conf
> # $1 is the git sha1 to check
> function checkpatch_commit
> {
> - local commit=$1
> - local cmd="git show --pretty=email $commit"
> + local commit cmd bug_lines non_i915_files
> +
> + commit=$1
> + cmd="git show --pretty=email $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
> local bug_lines=$($cmd | grep -m 1 -B 1 '^\+.*\WBUG' | grep -c '^[+-].*\WBUG')
> if test "$bug_lines" -eq 1; then
> warn_or_fail "New BUG macro added"
> fi
>
> if [ "$branch" = "drm-intel-next-queued" ]; then
> + # FIXME: this relies on local assignment not failing on command
> + # substitution failures
v2 here was just a straightforward rebase except for these two fixmes
for when we actually (probably accidentally) rely on this behaviour.
BR,
Jani.
--
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-11-24 15:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-24 15:32 [dim PATCH v2 1/7] dim: rename rebuild-nightly to rebuild-tip Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 2/7] dim: fix references to anything "nightly" in dim and documentation Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 3/7] dim: do not do local variable assignments in declaration Jani Nikula
2016-11-24 15:37 ` Jani Nikula [this message]
2016-11-24 15:32 ` [dim PATCH v2 4/7] dim: return exit status instead of actually exiting from url_to_remote Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 5/7] dim: fix list-upstreams when not in a git repo or with a drm upstream in place Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 6/7] dim: check positional parameter on dim fixes and cite Jani Nikula
2016-11-24 15:32 ` [dim PATCH v2 7/7] dim: unify rebuild fetch/merge messages Jani Nikula
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=87bmx4vqgl.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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