Skip to content

Add option for --first-parent in changelog#23

Merged
rsandell merged 2 commits intojenkinsci:masterfrom
onionjake:option-firstparent
Feb 5, 2015
Merged

Add option for --first-parent in changelog#23
rsandell merged 2 commits intojenkinsci:masterfrom
onionjake:option-firstparent

Conversation

@onionjake
Copy link
Copy Markdown

This adds an option to select whether or not --first-parent is
passed to "git log" when determining the changelog. The default
value is to include it.

This adds an option to select whether or not --first-parent is
passed to "git log" when determining the changelog.  The default
value is to include it.
@jenkinsadmin
Copy link
Copy Markdown
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@rsandell
Copy link
Copy Markdown
Member

rsandell commented Jan 9, 2015

Configured jobs before this change will default to not have --first-parent. Because when the job is read from disk the first-parent field is missing and so will be set to the boolean default which is false.

@onionjake
Copy link
Copy Markdown
Author

@rsandell I can reverse the logic so if it is checked --first-parent is excluded. That should keep the same behavior for already configured jobs.

@rsandell
Copy link
Copy Markdown
Member

Reverse logic is usually hard to grok. But in this case it might be OK.

You could also make the field into a Boolean reference and add a readResolve that would check if it is null and in that case set it to true, so old configs get converted, or check for null in the get and return true.

Renaming this option and reversing the logic effectively allows
backwards compatibility with the existing plugin behavior.
@onionjake
Copy link
Copy Markdown
Author

I've renamed the parameter and reversed the logic. Hopefully it isn't too confusing.

rsandell added a commit that referenced this pull request Feb 5, 2015
Add option for --first-parent in changelog
@rsandell rsandell merged commit 620bee5 into jenkinsci:master Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants