pub fn revert(
obj_store: &mut GitObjectStore,
commits_table: &mut CommitsTable,
commit_id: &str,
head_commit_id: &str,
author: &str,
) -> Result<String, RevertError>Expand description
Revert a commit by creating a new commit that undoes its changes.
- Find the target commit’s parent
- Diff parent -> target to get what the commit changed
- Apply the inverse (add removed triples, remove added triples) to HEAD
- Create a new commit with the inverted changes
Returns the new revert commit’s ID.