[ https://issues.jenkins-ci.org/browse/JENKINS-13368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163035#comment-163035 ]
Bertrand Latinville commented on JENKINS-13368: ----------------------------------------------- I've been using this correction for more than one month and I did not detect any problems related to included regions. The patch could be improved anyway by searching differences compared to the last fetch and not the last build. > Git plug-in & included regions : build not triggered in case of mutiple > commits in one push. > -------------------------------------------------------------------------------------------- > > Key: JENKINS-13368 > URL: https://issues.jenkins-ci.org/browse/JENKINS-13368 > Project: Jenkins > Issue Type: Bug > Components: git > Affects Versions: current > Environment: Debian > Reporter: Bertrand Latinville > Assignee: Nicolas De Loof > Labels: git > Attachments: > 0001-Include-region-polling-problem-in-case-of-multiple-c.patch > > > I've been testing the Included regions feature for GitSCM plugin > via SCM polling and Git hook. > We are building only one branch : master. > I could see that in some cases the jobs were not triggered whereas > some changes have been made in files matching the included regions pattern. > After some more testing I discovered that if several commits are made > and pushed at the same time, only changes from the last commit is taken into > account. > Spying the git command the plugin is using I could see : > git rev-parse --verify HEAD > git command : fetch -t https://url.git +refs/heads/*:refs/remotes/ > origin/* > git tag -l master > git command : rev-parse origin/master^{commit} > -> Gives the new SHA1 > git command : show --no-abbrev --format=raw -M --raw 'new sha1' > The last command shows only diff from latest commit, should't it be > something like : > git show --no-abbrev --format=raw -M --raw 'old sha1'..'new sha1' > 'old sha1' being the sha1 of the latest build. > I had a look at the source code of the git plugin and tried a patch. > With the correction, the problem is not reproduced in my use case > where I build only one branch. > I put the patch as attachment. > Jenkins 1.456 > Git Plugin 1.1.16 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira