修复 Kubernetes 工作区无法保存 Git 版本 #18

Merged
xhgit merged 1 commits from codex/fix-workspace-git-ownership into main 2026-11-09 23:24:30 +08:00
Owner

人工发现的问题

  • 在真实 K3s 工作区写入测试文件后,保存版本返回 Git staging failed,版本列表却显示空。核对日志确认 PVC 挂载目录由 Kubernetes 管理,Git 拒绝把它视为当前执行用户的仓库。

修复内容

  • 仅对当前隔离工作区设置本次 Git 命令的信任目录,保留 Git hooks 禁用。初始化、暂存和读取历史失败会显示实际的错误状态。

验证

  • 网关全量 40 项通过,新增回归覆盖空仓库、保存及读取版本和损坏仓库。
## 人工发现的问题 - 在真实 K3s 工作区写入测试文件后,保存版本返回 Git staging failed,版本列表却显示空。核对日志确认 PVC 挂载目录由 Kubernetes 管理,Git 拒绝把它视为当前执行用户的仓库。 ## 修复内容 - 仅对当前隔离工作区设置本次 Git 命令的信任目录,保留 Git hooks 禁用。初始化、暂存和读取历史失败会显示实际的错误状态。 ## 验证 - 网关全量 40 项通过,新增回归覆盖空仓库、保存及读取版本和损坏仓库。
xhgit added 1 commit 2026-11-08 23:25:16 +08:00
Allow versioning on Kubernetes workspace volumes
Verify control plane / verify (push) Canceled after 0s
Verify control plane / verify (pull_request) Canceled after 0s
89b7f2f54e
xhgit merged commit 318b7d8086 into main 2026-11-09 23:24:30 +08:00
xhgit deleted branch codex/fix-workspace-git-ownership 2026-11-09 23:24:30 +08:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: xhgit/webup-cloud#18