From d9655b0f014bd6b5ad6ebb2b9c11b409cbcb4a22 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 22 Feb 2021 05:30:56 -0700 Subject: pr-should-include-tests: recognized "renamed" tests git tries to recognize renamed files. This isn't always as helpful as intended. Turn it off, so we'll always see files as 'A'dded. Signed-off-by: Ed Santiago --- contrib/cirrus/pr-should-include-tests | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/cirrus/pr-should-include-tests') diff --git a/contrib/cirrus/pr-should-include-tests b/contrib/cirrus/pr-should-include-tests index a3b4847a7..e3c5d5da1 100755 --- a/contrib/cirrus/pr-should-include-tests +++ b/contrib/cirrus/pr-should-include-tests @@ -22,7 +22,8 @@ base=$(git merge-base ${DEST_BRANCH:-master} $head) # A foo.c # M bar.c # We look for Added or Modified (not Deleted!) files under 'test'. -if git diff --name-status $base $head | egrep -q '^[AM]\s+(test/|.*_test\.go)'; then +# --no-renames ensures that renamed tests (#9420) show up as 'A'dded. +if git diff --name-status --no-renames $base $head | egrep -q '^[AM]\s+(test/|.*_test\.go)'; then exit 0 fi -- cgit v1.2.3-54-g00ecf