-
Bug
-
Resolution: Unresolved
-
Major
-
None
Builds using SCM polling of a Git repo using Additional Behaviours / Included Regions results in spurious builds.
The build Changes shows that none of the changes apply to the paths configured in the Included Regions, but reviewing the Polling Log and then executing the git log command the Git plugin uses to determine changes seems to show the cause.
The plugin uses git log --full-history --no-abbrev --format=raw -M -m --raw to determine what changed. This not only includes merge commits, but in addition the -m flag causes a full diff for the parents to be shown, causing previously processed commits to show up, some which may match the whitelist and result in a spurious build.
Found the issue that introduced the problem years ago: https://github.com/jenkinsci/git-client-plugin/commit/340da905666600a18866ebba27376c7f1874d673#diff-4a13310f7c84a9d6e133def48c0aed5a
Amusingly, it includes this: