From c4071eedf8d41cf61e443f45c104bd0d28ac9a55 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Mon, 10 Apr 2023 22:37:08 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96update=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/command/command.py b/model/command/command.py index d2635d105..12e511cda 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -63,7 +63,10 @@ class Command: commits_log = '' index = 1 for commit in commits: - commits_log += f"[{index}] {commit.message}\n-----------\n" + if commit.message.endswith("\n"): + commits_log += f"[{index}] {commit.message}-----------\n" + else: + commits_log += f"[{index}] {commit.message}\n-----------\n" index+=1 remote_commit_hash = origin.refs.master.commit.hexsha[:6]