Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is in reference to gohugoio/hugo#10905 to make the full commit message (body) visible in the GitInfo.
The changes I've done in the three commits are outlined below:
git log
command to include%b
in the format to show the commit message body.Body
.\x1d
is used to separate the GitInfo items from file names, instead of new lines as done previously. This is because a commit message body can have new lines. File names are then split by new lines this results in a new array being created.TestCommitMessage
andAssertMessage
functions to assert the Subject and Body of commit messages for three different files. One with a Subject and no Body, one with a Subject and single line Body and one with a Subject and multi-line body.I'm not very familar with Golang to may have made simple errors, please feel free to point out any improvements that could be done.
Thanks!