新增: 完成汇报附 git 实测附录 branch/HEAD/未提交计数(B1-H1 单点)

This commit is contained in:
lxy
2026-10-06 12:47:18 +08:00
parent 71e548aafc
commit d2f586fc52
3 changed files with 40 additions and 2 deletions
+10
View File
@@ -89,6 +89,16 @@ async fn exec_git(working_dir: &str, args: &[&str]) -> (String, bool) {
(out, code == Some(0))
}
/// B1-H1 git 实测附录(无人值守专项)专用只读入口:rev-parse/status 等探测命令,
/// 供 deliver_completion_report_if_waited 汇报附录调用。独立薄封装而非开放 exec_git——
/// 写操作仍收敛在本模块工具注册内,附录路径只读零副作用。
pub(crate) async fn git_exec(sub: &str, args: &[&str], working_dir: &str) -> (String, bool) {
let mut full: Vec<&str> = Vec::with_capacity(args.len() + 1);
full.push(sub);
full.extend_from_slice(args);
exec_git(working_dir, &full).await
}
/// git status --porcelain 解析为结构化文件列表。
///
/// 成功判定(对齐 run_command succeeded=exit_code==0 口径):`status --porcelain`