From 74d8f325149969a7527355c9df2c40b62c354cf4 Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 9 Oct 2020 09:54:28 -0400 Subject: [PATCH] ceph-pr-commits: Use sha1 instead of GIT_COMMIT I think GIT_COMMIT is the merge commit. Everything Kefu and I could find indicated it should be valid to use here. Switching to ${sha1} works though. Signed-off-by: David Galloway --- ceph-pr-commits/build/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ceph-pr-commits/build/build b/ceph-pr-commits/build/build index 504b7bca..c2f4a9f7 100644 --- a/ceph-pr-commits/build/build +++ b/ceph-pr-commits/build/build @@ -6,8 +6,8 @@ # this job/check is required, it hung with 'Expected — Waiting for status to be reported' pushd . cd "$WORKSPACE/ceph" -if git rev-parse --verify ${GIT_COMMIT}^2; then - files="$(git diff --name-only ${GIT_COMMIT}^1...${GIT_COMMIT}^2)" +if git rev-parse --verify ${sha1}^2; then + files="$(git diff --name-only ${sha1}^1...${sha1}^2)" echo -e "changed files:\n$files" if [ $(echo "$files" | grep -v '^doc/' | wc -l) -gt 0 ]; then echo "Not a docs only change. Will proceed with signed commit check." -- 2.39.5