stable

Clone or download

Read-only

fix(git): Post commit hook analyze commits in chronological order

Until now, commits where analyzed with `rev-list` default, that is the reverse chronological order. With the introduction of smart commits, it makes more sense to analyze in the chronological order so the first commit that reference "closes something" will actually trigger the close, instead of the last one. The issue can be seen when git commit message summary includes the closing keyword and that the fix is merged with a merge commit. In this situation, the merge commit also embed as part of commit body the summary of the commit it merges. With reverse chronological order, it's the merge commit the will be analyzed first hence close the ticket. By analyzing in chronological order, it's the actual commit of fix that will be seen first. Part of: request #27896 Smart commit is not smart enough Change-Id: I8c1724f4065abe9c636845a54431d5bed6ccbf00

Modified Files

Name
M plugins/git/include/Git_Exec.class.php +15 −2 Go to diff View file
M plugins/git/include/Hook/LogAnalyzer.php +1 −1 Go to diff View file
M plugins/git/tests/unit/Hook/LogAnalyzerTest.php +7 −7 Go to diff View file