Я использую эту команду в python script для создания xml файла, который позже обрабатывается нашей CI-системой:
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"
Он выводит результат в следующем формате
<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>
Использование git log -1
показывает сообщение с линиями, но с симпатичным форматом они опущены. Есть ли способ произвести вывод следующим образом?
<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>