From 1fd6a3679335fb32f6cb0e9e66353cee76417c68 Mon Sep 17 00:00:00 2001 From: Pierre Vigier Date: Wed, 13 Mar 2019 14:36:53 +0100 Subject: [PATCH] Display the merge message in index viewer --- src/renderer/components/index-viewer.tsx | 15 ++++++++++++++- src/renderer/helpers/repo-wrapper.ts | 12 ++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/renderer/components/index-viewer.tsx b/src/renderer/components/index-viewer.tsx index 5a60922..2797e30 100644 --- a/src/renderer/components/index-viewer.tsx +++ b/src/renderer/components/index-viewer.tsx @@ -48,8 +48,21 @@ export class IndexViewer extends React.PureComponent((resolve, reject) => { + fs.readFile(Path.join(this.path, 'MERGE_MSG'), (error, data) => { + if (!error) { + resolve(data.toString().split('\n')[0]); + } else { + reject(error); + } + }); + }); + } + async finishMerge(message: string) { try { const author = this.getSignature();