pub fn get_diff_between(base: &str, head: &str) -> Result<String>Expand description
Returns the diff between two branches or commits.
§Arguments
base- The base branch/commithead- The head branch/commit to compare against base
§Errors
Returns an error if the commits cannot be parsed or the diff cannot be generated.
§Examples
use rusty_commit::git;
let diff = git::get_diff_between("main", "HEAD").unwrap();
println!("{}", diff);