refactor(git): update git command to use trusted parameters

- Modified commit creation to use trusted GitCommandParams
- Ensured secure command execution with trusted parameter validation
- Maintained existing commit OID handling and update reference logic
This commit is contained in:
zhenyi 2026-05-30 20:06:44 +08:00
parent 4f76816de8
commit 9ffc7c9fb3

View File

@ -153,7 +153,7 @@ impl GitBare {
commit_oid.as_str().to_string(), commit_oid.as_str().to_string(),
]; ];
let _update_output = self.git_command_with( let _update_output = self.git_command_with(
GitCommandParams::new(update_ref_args), GitCommandParams::new(update_ref_args).trusted(),
)?; )?;
Ok(commit_oid) Ok(commit_oid)