summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-09-15 13:21:25 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-09-15 13:21:25 +0200
commit29818b8e9241d5d891e150bd4ba523c899ecacd0 (patch)
tree461308667c3a312e09c1122f28a4a93c0ba70fd9 /scripts
parentfd485f2f13d59d94649fe32a1969150908f569c9 (diff)
verify-indentation.sh: fix for pull request from bar/master to foo/master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/verify-indentation.sh8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/verify-indentation.sh b/scripts/verify-indentation.sh
index 80c58283..a8065b0c 100755
--- a/scripts/verify-indentation.sh
+++ b/scripts/verify-indentation.sh
@@ -21,11 +21,9 @@ ASTYLEDIFF=/tmp/astyle.diff
if [ ! -z $GITHUB_BASE_REF ] && [ ! -z $GITHUB_HEAD_REF ]; then
# on a PR
echo "GitHub PR COMMIT RANGE: ${GITHUB_BASE_REF}..${GITHUB_HEAD_REF}"
- git branch ${GITHUB_BASE_REF} origin/${GITHUB_BASE_REF}
- git branch ${GITHUB_HEAD_REF} origin/${GITHUB_HEAD_REF}
- BASE_SHA1=$(git rev-parse ${GITHUB_BASE_REF})
- HEAD_SHA1=$(git rev-parse ${GITHUB_HEAD_REF})
- FILES=$(git diff --diff-filter=AMR --name-only ${BASE_SHA1}..${HEAD_SHA1} | tr '\n' ' ' )
+ git branch tmp_${GITHUB_BASE_REF} origin/${GITHUB_BASE_REF}
+ BASE_SHA1=$(git rev-parse tmp_${GITHUB_BASE_REF})
+ FILES=$(git diff --diff-filter=AMR --name-only ${BASE_SHA1}..${GITHUB_SHA} | tr '\n' ' ' )
elif [ ! -z $GITHUB_SHA ]; then
echo "GitHub push COMMIT $GITHUB_SHA"
FILES=$(git diff --diff-filter=AMR --name-only ${GITHUB_SHA}~1..${GITHUB_SHA} | tr '\n' ' ' )