From f3de256fa3dfa6ca35020a2bac138f6f8b736581 Mon Sep 17 00:00:00 2001 From: "sayurinana(vm)" Date: Thu, 18 Dec 2025 10:11:18 +0800 Subject: [PATCH] =?UTF-8?q?[aide]=20task-optimize:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=B7=B2=E5=AE=9E=E7=8E=B0=EF=BC=9Agit=20add=5Fall=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=8E=92=E9=99=A4=20.lock=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .aide/flow-status.json | 12 ++++++++++-- aide-program/aide/flow/git.py | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.aide/flow-status.json b/.aide/flow-status.json index dd98df3..8c8f67b 100644 --- a/.aide/flow-status.json +++ b/.aide/flow-status.json @@ -1,7 +1,7 @@ { "task_id": "2025-12-18T10-09-00", "current_phase": "task-optimize", - "current_step": 2, + "current_step": 3, "started_at": "2025-12-18T10:09:00+08:00", "history": [ { @@ -17,7 +17,15 @@ "action": "next-step", "phase": "task-optimize", "step": 2, - "summary": "问题定位完成:finish 环节在锁内执行 git add,导致 .lock 文件被提交" + "summary": "问题定位完成:finish 环节在锁内执行 git add,导致 .lock 文件被提交", + "git_commit": "9d4f6b8a2234376ce5498fc0a0c4f3d06e2f4550" + }, + { + "timestamp": "2025-12-18T10:11:18+08:00", + "action": "next-step", + "phase": "task-optimize", + "step": 3, + "summary": "修复已实现:git add_all 方法排除 .lock 文件" } ], "source_branch": "master", diff --git a/aide-program/aide/flow/git.py b/aide-program/aide/flow/git.py index 26c27b9..cae825a 100644 --- a/aide-program/aide/flow/git.py +++ b/aide-program/aide/flow/git.py @@ -25,8 +25,8 @@ class GitIntegration: def add_all(self) -> None: self.ensure_repo() - # 使用 -A 确保删除的文件也被暂存 - result = self._run(["add", "-A"], check=False) + # 使用 -A 确保删除的文件也被暂存,排除 .lock 文件避免锁文件被提交 + result = self._run(["add", "-A", "--", ".", ":!*.lock"], check=False) if result.returncode != 0: raise FlowError(_format_git_error("git add 失败", result))