fix(git): use Git-openable null paths for GIT_CONFIG_GLOBAL/SYSTEM on…

fix(git): use Git-openable null paths for GIT_CONFIG_GLOBAL/SYSTEM on Windows (#142749)

* fix(git): use Git-openable null paths for GIT_CONFIG_GLOBAL/SYSTEM on Windows

os.devNull returns the device-namespace path \.\nul on Windows, which
Git for Windows rejects with exit 128 when it must open and parse
GIT_CONFIG_GLOBAL or GIT_CONFIG_SYSTEM. #140803 fixed the
worker/publication helpers; the same pattern remained in the gateway
publication/transport/index, session materialization, update target
inspection, and project clone paths — making every openclaw update on a
Windows git checkout fail with fetch-failed.

Adds gitNullConfigPath() to infra/git-exec ("NUL" on win32, /dev/null
otherwise, matching the node-worker-workspace.ts precedent) and applies
it to the 16 remaining GIT_CONFIG_GLOBAL/SYSTEM sites. core.hooksPath
and core.attributesFile accept the device path and are intentionally
unchanged, as is the project-seed shell heredoc that only ever runs on
Linux.

Regression tests cover the platform mapping, a real-git integration run
with the helper's path, and a Windows-only case documenting the os.devNull
exit-128 defect (red evidence for issue #141279).

Fixes #141279

* chore: restart CI lanes (compact-large-11 shard failed in a window where the same shard family is a known flake)

---------

Co-authored-by: pengzh1 
添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论