static-checks-include-order.sh: Use current build branch
When testing a patch, run check against current branch being built as
a base revision, instead of hardcoding "origin/master".
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Iaf4013a5fdc35248d97fd97fe2d13e74aa5750a6
diff --git a/script/static-checks/static-checks-include-order.sh b/script/static-checks/static-checks-include-order.sh
index 52e783c..f7a04aa 100755
--- a/script/static-checks/static-checks-include-order.sh
+++ b/script/static-checks/static-checks-include-order.sh
@@ -13,7 +13,7 @@
echo "# Check order of includes on the last patch"
TEST_CASE="Order of includes on the last patch(es)"
"$CI_ROOT/script/static-checks/check-include-order.py" --tree "$1" \
- --patch --from-ref origin/master \
+ --patch --from-ref "$TF_GERRIT_BRANCH" \
&> "$LOG_FILE"
else
echo "# Check order of includes of the entire source tree"