@@ -40,12 +40,21 @@ impl Deref for ConflictedTreeKey {
4040}
4141
4242pub trait RepositoryExt {
43+ /// Cherry-pick, but understands GitButler conflicted states.
44+ ///
45+ /// This method *should* always be used in favour of native functions.
4346 fn cherry_pick_gitbutler (
4447 & self ,
4548 head : & git2:: Commit ,
4649 to_rebase : & git2:: Commit ,
4750 merge_options : Option < & MergeOptions > ,
4851 ) -> Result < git2:: Index , anyhow:: Error > ;
52+
53+ /// Find the real tree of a commit, which is the tree of the commit if it's not in a conflicted state
54+ /// or the tree according to `side` if it is conflicted.
55+ ///
56+ /// Unless you want to find a particular side, you likely want to pass Default::default()
57+ /// as the [`side`](ConflictedTreeKey) which will give the automatically resolved resolution
4958 fn find_real_tree (
5059 & self ,
5160 commit : & git2:: Commit ,
@@ -54,10 +63,6 @@ pub trait RepositoryExt {
5463}
5564
5665impl RepositoryExt for git2:: Repository {
57- /// cherry-pick, but understands GitButler conflicted states
58- ///
59- /// cherry_pick_gitbutler should always be used in favour of libgit2 or gitoxide
60- /// cherry pick functions
6166 fn cherry_pick_gitbutler (
6267 & self ,
6368 head : & git2:: Commit ,
@@ -83,11 +88,6 @@ impl RepositoryExt for git2::Repository {
8388 . context ( "failed to merge trees for cherry pick" )
8489 }
8590
86- /// Find the real tree of a commit, which is the tree of the commit if it's not in a conflicted state
87- /// or the parent parent tree if it is in a conflicted state
88- ///
89- /// Unless you want to find a particular side, you likly want to pass Default::default()
90- /// as the ConfclitedTreeKey which will give the automatically resolved resolution
9191 fn find_real_tree (
9292 & self ,
9393 commit : & git2:: Commit ,
0 commit comments