CI: lint-diff only on new commits wrt to target branch
Using plain git diff origin/${TARGET_BRANCH}
results in a diff that includes commits on origin/${TARGET_BRANCH}
which are not on HEAD
. Thus use git diff origin/${TARGET_BRANCH}...
to only show the diff for commits that are on HEAD
but not origin/${TARGET_BRANCH}
.
See https://stackoverflow.com/a/24186641 and https://stackoverflow.com/a/46345364.