[gitg/wip/albfan/body-patch] Add body to patch
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/albfan/body-patch] Add body to patch
- Date: Tue, 1 Jan 2019 19:21:58 +0000 (UTC)
commit 844e2f59935813a909710777458d3e09d4155903
Author: Alberto Fanjul <albertofanjul gmail com>
Date: Tue Jan 1 20:20:58 2019 +0100
Add body to patch
gitg/gitg-commit-action-create-patch.vala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gitg/gitg-commit-action-create-patch.vala b/gitg/gitg-commit-action-create-patch.vala
index d31bc5f9..5621531d 100644
--- a/gitg/gitg-commit-action-create-patch.vala
+++ b/gitg/gitg-commit-action-create-patch.vala
@@ -127,7 +127,11 @@ class CommitActionCreatePatch : GitgExt.UIElement, GitgExt.Action, GitgExt.Commi
var opts = new Ggit.DiffFormatEmailOptions();
- opts.summary = commit.get_message();
+ var message = commit.get_message();
+ opts.summary = message;
+ var pos = message.index_of_char('\n');
+ if (pos != -1 && pos + 1 != message.length)
+ opts.body = message.substring(pos + 2, message.length - (pos + 2));
opts.patch_number = 1;
opts.total_patches = 1;
opts.id = commit.get_id();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]