I'm using this command in a python script to generate an xml file that is later processed by our CI-system:
git log -1 --date=iso --pretty=format:"<logentry revision=\"%h\" scm=\"git\">%n<author>%an</author>%n<date>%ad</date>%n<msg>%s</msg>%n"
It produces output on the following format
<logentry revision="1e370f5" scm="git">
<author>Johan Govers</author>
<date>2016-02-24 13:11:15 +0100</date>
<msg>PP-204 Try out git PP-207 New build script * Add missing kind="file" to path nodes in changes xml file.</msg>
Using git log -1
shows the message with the linebreaks but with the pretty format they are omitted. Is there any way to produce an output like the following?
<logentry revision="1e370f5" scm="git">
<author>Johan Govers</author>
<date>2016-02-24 13:11:15 +0100</date>
<msg>PP-204 Try out git
PP-207 New build script
* Add missing kind="file" to path nodes in changes xml file.</msg>