Skip to main content

changed_since

Function changed_since 

Source
pub async fn changed_since(
    root: &Path,
    git_ref: &str,
) -> Result<Vec<PathBuf>, GitError>
Expand description

Files changed on this branch relative to git_ref, relative to root.

Three-dot diff (<ref>...HEAD) is the merge-base diff — what my branch changed. Two-dot would also report everything that landed on the other branch since the fork, which would gate a push on files the author never touched.

git_ref is the same string the user typed: a branch name, a SHA, or a remote-tracking ref like origin/main. A ref that does not exist makes git exit non-zero, and that surfaces here as Err(GitError::NonZero) rather than an empty Vec — see the module docs.