static-checks: use `remotes/origin/master` instead of `master`

This is a safer approach in cases where master local branch does not
exist, i.e. shadow cloning.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I2fdae51673169d4c32d3f308c2eb3fd885c42e76
diff --git a/script/static-checks/check-copyright.py b/script/static-checks/check-copyright.py
index 39863c7..63db460 100755
--- a/script/static-checks/check-copyright.py
+++ b/script/static-checks/check-copyright.py
@@ -180,7 +180,7 @@
 only files that are modified by the latest patch(es).""",
                         action="store_true")
 
-    (rc, stdout, stderr) = utils.shell_command(['git', 'merge-base', 'HEAD', 'master'])
+    (rc, stdout, stderr) = utils.shell_command(['git', 'merge-base', 'HEAD', 'refs/remotes/origin/master'])
     if rc:
         print("Git merge-base command failed. Cannot determine base commit.")
         sys.exit(rc)
diff --git a/script/static-checks/static-checks-coding-style-line-endings.sh b/script/static-checks/static-checks-coding-style-line-endings.sh
index 570b6b5..dc97418 100755
--- a/script/static-checks/static-checks-coding-style-line-endings.sh
+++ b/script/static-checks/static-checks-coding-style-line-endings.sh
@@ -15,7 +15,7 @@
 
 if [[ "$2" == "patch" ]]; then
     cd "$1"
-    parent=$(git merge-base HEAD master | head -1)
+    parent=$(git merge-base HEAD refs/remotes/origin/master | head -1)
     git diff ${parent}..HEAD --no-ext-diff --unified=0 --exit-code -a --no-prefix | grep -E "^\+" | \
     grep --files-with-matches $'\r$' &> "$LOG_FILE"
 else