Skip to main content

git_stdout_in

Function git_stdout_in 

Source
pub fn git_stdout_in(args: &[&str], dir: &Path) -> Result<String>
Expand description

Run a git command in a specific directory and return stdout as a trimmed string.

Args:

  • args: Arguments to pass to git.
  • dir: Working directory for the git command.

Usage:

let log = git_stdout_in(&["log", "--oneline", "-1"], &repo_path)?;