From ce476ca16370d70e95198b44960ce326b501588f Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Wed, 5 Apr 2023 20:32:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dupdate=E6=8C=87?= =?UTF-8?q?=E4=BB=A4commit=E6=95=B0=E9=87=8F=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/command/command.py b/model/command/command.py index d20594b63..992688429 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -36,7 +36,7 @@ class Command: repo = Repo(path="QQChannelChatGPT") now_commit = repo.head.commit - # 得到最新的5条commit列表, 包含commit信息 + # 得到最新的3条commit列表, 包含commit信息 origin = repo.remotes.origin origin.fetch() commits = list(repo.iter_commits('master', max_count=3)) @@ -47,7 +47,7 @@ class Command: index+=1 remote_commit_hash = origin.refs.master.commit.hexsha[:6] - return True, f"当前版本: {now_commit.hexsha[:6]}\n最新版本: {remote_commit_hash}\n\n最新5条commit:\n{str(commits_log)}\n使用update latest更新至最新版本\n" + return True, f"当前版本: {now_commit.hexsha[:6]}\n最新版本: {remote_commit_hash}\n\n最新3条commit:\n{str(commits_log)}\n使用update latest更新至最新版本\n" else: if l[1] == "latest": try: