diff options
-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 |