Skip to main content

run_git_bytes

Function run_git_bytes 

Source
pub fn run_git_bytes(
    git: &PushGit,
    arguments: &[OsString],
    input: Option<&str>,
) -> Result<Vec<u8>, ManualPushRangeError>
Expand description

What: Run a Git query with stdin text and return its exact stdout bytes. Why: Batch queries (cat-file --batch-check, rev-list --stdin) read their requests from stdin, and any Git failure is an error, never an empty answer.

In TS you’d write (pseudocode):

await runGitBytes({ gitPath, cwd, args, input });