[gitg/wip/albfan/body-patch: 5/6] Add body to patch
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/albfan/body-patch: 5/6] Add body to patch
- Date: Wed, 2 Jan 2019 21:54:02 +0000 (UTC)
commit c4759f2b2e482298b07e3f7c78eec5a21f50999d
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]