diff --git a/lib/src/commit_builder.rs b/lib/src/commit_builder.rs index 67c50e48a..7a6ea1d2b 100644 --- a/lib/src/commit_builder.rs +++ b/lib/src/commit_builder.rs @@ -32,7 +32,8 @@ pub struct CommitBuilder<'repo> { } impl CommitBuilder<'_> { - pub fn for_new_commit<'repo>( + // Use MutRepo::new_commit() instead + pub(crate) fn for_new_commit<'repo>( mut_repo: &'repo mut MutableRepo, settings: &UserSettings, parents: Vec, @@ -61,7 +62,8 @@ impl CommitBuilder<'_> { } } - pub fn for_rewrite_from<'repo>( + // Use MutRepo::rewrite_commit() instead + pub(crate) fn for_rewrite_from<'repo>( mut_repo: &'repo mut MutableRepo, settings: &UserSettings, predecessor: &Commit, diff --git a/lib/src/repo.rs b/lib/src/repo.rs index dbc3f5193..bfe88867d 100644 --- a/lib/src/repo.rs +++ b/lib/src/repo.rs @@ -796,6 +796,8 @@ impl MutableRepo { predecessor: &Commit, ) -> CommitBuilder { CommitBuilder::for_rewrite_from(self, settings, predecessor) + // CommitBuilder::write will record the rewrite in + // `self.rewritten_commits` } pub fn write_commit(