File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/main/groovy/net/minecrell/gitpatcher/git Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ plugins {
1212}
1313
1414group = ' net.minecrell'
15- version = ' 0.4.1 '
15+ version = ' 0.4.2 '
1616description = ' A Gradle plugin to manage patches for Git repositories'
1717
1818sourceCompatibility = 1.6
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ class MailPatch {
7474 continue
7575 }
7676
77+ line = line. trim()
78+
7779 if (line. startsWith(' diff' )) {
7880 break
7981 }
@@ -97,7 +99,9 @@ class MailPatch {
9799 builder = new StringBuilder (StringUtils . removeStart(content, ' [PATCH] ' ))
98100 }
99101 } else {
100- builder << line. trim()
102+ if (! line. empty) {
103+ builder << ' \n ' << line
104+ }
101105 }
102106 }
103107
@@ -143,7 +147,8 @@ class MailPatch {
143147 dateFormat. printTo writer, new DateTime (commit. authorIdent. getWhen(), DateTimeZone . forTimeZone(commit. authorIdent. timeZone))
144148 writer << ' \n '
145149
146- writer << ' Subject: [PATCH] ' << commit. fullMessage << ' \n\n\n '
150+ def message = commit. fullMessage
151+ writer << ' Subject: [PATCH] ' << message << (message. endsWith(' \n ' ) ? ' \n\n ' : ' \n\n\n ' )
147152 writer. flush()
148153 }
149154
You can’t perform that action at this time.
0 commit comments