Skip to content

CI: lint-diff only on new commits wrt to target branch

Stephan Lachnit requested to merge p/lint_diff_relative_commits into master

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.

Merge request reports