Skip to main content

git_diff_from

Function git_diff_from 

Source
pub fn git_diff_from(start_oid: &str) -> Result<String>
Expand description

Generate a diff from a specific starting commit.

Takes a starting commit OID and generates a diff between that commit and the current working tree. Returns a formatted diff string suitable for LLM analysis.

§Arguments

  • start_oid - The OID of the commit to diff from

§Returns

Returns a formatted diff string, or an error if:

  • The repository cannot be opened
  • The starting commit cannot be found
  • The diff cannot be generated

§Note