Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-13580

git plugin "included regions" feature is bypassed when evaluating a merge commit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      If the built branch is updated via a merge commit rather than a change, the build is triggered regardless of whether the files updated in the merge match the included regions regexp or not.

      A test repo can be found at http://blank.org/memory/work/jenkins-bug/repo/jenkins-bug/regions-test.git. A config.xml is attached to this ticket. Note that commit 10c1279f32a5ffe9f6eabfe01aa360341144c263 in that repo (merge testbranch->master) triggers a build.

        Attachments

          Activity

          Hide
          blatinville Bertrand Latinville added a comment -

          This problem could be linked with the issue I raised
          where multiple commits in one push are not taken into account.

          https://issues.jenkins-ci.org/browse/JENKINS-13368

          Show
          blatinville Bertrand Latinville added a comment - This problem could be linked with the issue I raised where multiple commits in one push are not taken into account. https://issues.jenkins-ci.org/browse/JENKINS-13368
          Hide
          nmehl Nathan Mehl added a comment -

          A potential fix can be found here:

          https://github.com/jenkinsci/git-plugin/pull/69

          Show
          nmehl Nathan Mehl added a comment - A potential fix can be found here: https://github.com/jenkinsci/git-plugin/pull/69
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nathan J. Mehl
          Path:
          src/main/java/hudson/plugins/git/GitAPI.java
          http://jenkins-ci.org/commit/git-plugin/3c83d2e4d38dd882cb7ddd096ff90c936e1f3e7a
          Log:
          [FIXED JENKINS-13580] Use 'git whatchanged' instead of 'git show'

          This forces file-by-file evaluation necessary for included/excluded
          regions to be applied correctly to merge commits.

          See: https://issues.jenkins-ci.org/browse/JENKINS-13580, which we
          believe is resolved here.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nathan J. Mehl Path: src/main/java/hudson/plugins/git/GitAPI.java http://jenkins-ci.org/commit/git-plugin/3c83d2e4d38dd882cb7ddd096ff90c936e1f3e7a Log: [FIXED JENKINS-13580] Use 'git whatchanged' instead of 'git show' This forces file-by-file evaluation necessary for included/excluded regions to be applied correctly to merge commits. See: https://issues.jenkins-ci.org/browse/JENKINS-13580 , which we believe is resolved here.

            People

            • Assignee:
              Unassigned
              Reporter:
              nmehl Nathan Mehl
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: