Skip to main content

diverging_from

Function diverging_from 

Source
pub async fn diverging_from(
    root: &Path,
    commit: &str,
) -> Result<Uncommitted, GitError>
Expand description

What the working tree does not hold of commit commit, each path named from the directory drep runs in.

The branch queries (--diff, --tip, a pre-commit pre-push range) review one commit’s diff while the deterministic tools read the working tree, which differs from that commit whenever the pushed ref is not the one checked out or the checkout carries edits of its own. Linting it there judged content the push does not contain, so a lint-failing pushed commit passed.

The working tree holds a path of commit whenever it holds the committing index’s entry and that entry is commit’s, so the answer is uncommitted_paths together with every path where the index and commit differ, deletions in either direction included. A path that differs from the index but has been restored to commit’s content is listed too: that is the conservative direction, because the alternative is a second definition of “differs” beside the one staged mode already trusts.