Repository navigation
Conversation
Signed-off-by: lusendong.6789 <[email protected]>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh
动机 / Motivation
维护者在干净环境执行 worktree 集成测试,需要让测试实际走到分支同步和结果读回。 linked worktree 的 source commit 从 bare 仓库读取身份。基线依赖开发者环境提供身份,在没有全局配置时先于同步退出 128。 候选在同一个临时 bare 仓库写入测试姓名和邮箱。两个 linked worktree 共享该身份,原测试能提交更新、合入源分支并验证集成 HEAD。 本变更仅修正现有测试的 Git fixture。
改动思路 / Approach
fixture 本来就为 seed 配置合成身份。Git worktree 共享的是另一个 bare 仓库的 common directory,所以应在那个 fixture 初始化身份。兼容 wrapper、执行 sync 和验证候选分支的断言继续按原流程运行。
具体改动 / Changes
审查 4322029,基线 d19a0d7。三个新增行负责说明并设置临时配置。提交与同步沿现有创建源提交、读取 legacy worktree 清单、同步与最终 HEAD 读回路径,确认两个源分支的文件进入集成树。 原集成约定 · 改动位置
对主干的风险 / Risks
同条件对照基线,source worktree 的 git commit 返回 128,stderr 记录身份未知且自动探测关闭。候选全套还保持错误 worktree 或分支身份的拒绝。 屏蔽 system 和 global config、作者和提交者环境变量,再要求 Git 只用显式设置。候选 HEAD 与收据一致,集成树含 source 更新 a2 和另一源的 b1,linked checkout 保持在预定分支。 本地 29 项 integration_branch 测试及标准 premerge 5 项直接检查通过,定向核实的提交身份属于临时 bare 仓库。 与同作者 #9718 的 host 测试修复涉及不同 fixture 和消费者,当前补丁没有新增可合并的测试副本。
我的整体评价 / Verdict
APPROVE。 无阻塞发现。干净环境下重新覆盖了实际集成行为。复验使用真正的 Git 2.56.0,旧版拒绝 -z 的行为由既有兼容 wrapper 模拟。未安装或执行 Git 2.35 二进制。
English verdict: APPROVE at 4322029. The unchanged sync assertions pass with no global Git identity, and the original fixture fails at its first linked-worktree commit under the same environment.
Goal And Delivered Outcome
main.Author Declaration
tests/capabilities/test_integration_branch.pyatd19a0d7e0d.Validation
Tested
4322029b1e105f5074868a39cafeed4f6d44a430with disposable synthetic repositories.This change is confined to one existing test fixture. UI impact is none. The commit includes a DCO sign-off.