diff options
author | Simon Glass <sjg@chromium.org> | 2021-02-01 12:10:21 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-01 21:25:32 +0000 |
commit | 80218febc125d4da8417a48e6f6252ff9f12d4c9 (patch) | |
tree | 3a516fb7cf9ec0b04ace62317e3447ae00cfa4db | |
parent | a35d37ef3b0f398d2989a43122f38bbd5ef352ee (diff) | |
download | chrome-ec-80218febc125d4da8417a48e6f6252ff9f12d4c9.tar.gz |
util: Make sure hooks do not show external diff tool
At present when I 'repo upload' it opens meld and shows me all the
changes I have made, sometimes many times.
Add the --no-ext-diff flag to two up the pre-submit scripts to fix
this.
BUG=none
BRANCH=none
TEST=repo upload... see that meld does not run
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Id48cc1654f681e19052298c1ab98911883c19318
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2665297
Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-x | util/host_command_check.sh | 3 | ||||
-rwxr-xr-x | util/presubmit_check.sh | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/util/host_command_check.sh b/util/host_command_check.sh index 62911bb0c3..f153762d84 100755 --- a/util/host_command_check.sh +++ b/util/host_command_check.sh @@ -82,7 +82,8 @@ should_check() { main() { # Do not run the check unless an EC_[xxx]CMD change is present. - if [[ -z "$(git diff "${PRESUBMIT_COMMIT}~" "${PRESUBMIT_COMMIT}" -U0 | + if [[ -z "$(git diff --no-ext-diff "${PRESUBMIT_COMMIT}~" \ + "${PRESUBMIT_COMMIT}" -U0 | egrep 'EC_[^ ]*CMD')" ]]; then exit 0 fi diff --git a/util/presubmit_check.sh b/util/presubmit_check.sh index bbf4338fad..7d46f38a0f 100755 --- a/util/presubmit_check.sh +++ b/util/presubmit_check.sh @@ -13,7 +13,8 @@ if [[ -z ${upstream_branch} ]]; then fi # This will print the offending CPRINTS invocations, if any, and the names of # the files they are in. -if git diff "${upstream_branch}" HEAD | grep -e '^+\(.*CPRINTS(.*\\n"\|++\)' | +if git diff --no-ext-diff "${upstream_branch}" HEAD | + grep -e '^+\(.*CPRINTS(.*\\n"\|++\)' | grep CPRINTS -B1 >&2 ; then echo "error: CPRINTS strings should not include newline characters" >&2 exit 1 |