CommitDatabaseHelper¶
- class dsviper.CommitDatabaseHelper¶
Bases:
objectA utility class for a Commit Database. Note: Not directly instantiable.
- static fast_forward(commit_database: CommitDatabase, commit_id: ValueCommitId) ValueCommitId¶
Return the commit_id of the most plausible head.
- static forward(commit_database: CommitDatabase, commit_id: ValueCommitId) ValueCommitId¶
Return the commit_id of the uniq head or fast_forward.
- static reduce_heads(commit_database: CommitDatabase, commit_id: ValueCommitId | None = None) ValueCommitId | None¶
Reduce to a single head by iteratively merging the other heads into the anchor commit_id (which must be a head; default: last_commit_id). Return the new commit_id or None.