Skip to main content

get_uncommitted_changes

Function get_uncommitted_changes 

Source
pub fn get_uncommitted_changes() -> Result<Vec<DiffEntry>>
Expand description

Get uncommitted changes in the working directory.

This includes both staged and unstaged changes. Uses git diff HEAD --numstat to compare the working directory against HEAD.

ยงReturns

  • Ok(Vec<DiffEntry>) - List of uncommitted changes (empty if clean or not a git repo)
  • Err - Only on IO errors