Update 'Get-ChangeLog' to make it more accurate#6764
Update 'Get-ChangeLog' to make it more accurate#6764TravisEz13 merged 2 commits intoPowerShell:masterfrom
Conversation
|
|
||
| # Find the commits that were made after the merge commit. | ||
| $new_commits_after_merge_commit = git --no-pager log --no-merges "$commit_hash..HEAD" --format=$format | New-CommitNode | ||
| $new_commits_after_merge_commit = @(git --no-pager log --first-parent "$commit_hash..HEAD" --format=$format | New-CommitNode) |
There was a problem hiding this comment.
--first-parent find only the parent commit in a set of merge commits?
There was a problem hiding this comment.
confirmed... this explained it well for me: https://opendatascience.com/git-first-parent-have-your-messy-history-and-eat-it-too/
There was a problem hiding this comment.
Maybe the comment should be updated
There was a problem hiding this comment.
--first-parent basically means for any merge node, only follow the parent node on the master branch side. In case we merge a branch to master for a PR, only the merge node will show up in this way, the individual commits from that branch will be ignored. This is what we want because the merge commit itself already represents the PR.
I will update the comment to explain --first-parent
PR Summary
Update 'Get-ChangeLog' to make it more accurate
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests