Skip to main content

get_diff_since

Function get_diff_since 

Source
pub fn get_diff_since(base_commit: &str) -> Result<Vec<DiffEntry>>
Expand description

Get file changes since a specific commit.

Uses git diff --numstat combined with --name-status to get accurate file change information including additions, deletions, and change type.

§Arguments

  • base_commit - The commit hash to compare against (e.g., “abc1234” or “HEAD~5”)

§Returns

  • Ok(Vec<DiffEntry>) - List of file changes (empty if no changes or not a git repo)
  • Err - Only on IO errors, not on git command failures