We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a608ae commit 1d90219Copy full SHA for 1d90219
asyncgit/src/sync/commit_details.rs
@@ -60,7 +60,7 @@ impl CommitMessage {
60
///
61
pub fn combine(self) -> String {
62
if let Some(body) = self.body {
63
- format!("{}{}", self.subject, body)
+ format!("{}\n{}", self.subject, body)
64
} else {
65
self.subject
66
}
@@ -158,4 +158,13 @@ mod tests {
158
159
Ok(())
160
161
+
162
+ #[test]
163
+ fn test_commit_message_combine() -> Result<()> {
164
+ let msg = CommitMessage::from("foo\nbar\r\ntest");
165
166
+ assert_eq!(msg.combine(), String::from("foo\nbar\ntest"));
167
168
+ Ok(())
169
+ }
170
0 commit comments