@@ -71,7 +71,6 @@ pub struct Apply<'a> {
7171 pub author : Option < ( String , String ) > ,
7272 pub committer : Option < ( String , String ) > ,
7373 pub message : Option < String > ,
74- pub parents : Option < Vec < git2:: Oid > > ,
7574}
7675
7776impl < ' a > Clone for Apply < ' a > {
@@ -81,7 +80,6 @@ impl<'a> Clone for Apply<'a> {
8180 author : self . author . clone ( ) ,
8281 committer : self . committer . clone ( ) ,
8382 message : self . message . clone ( ) ,
84- parents : self . parents . clone ( ) ,
8583 }
8684 }
8785}
@@ -93,7 +91,6 @@ impl<'a> Apply<'a> {
9391 author : None ,
9492 committer : None ,
9593 message : None ,
96- parents : None ,
9794 }
9895 }
9996
@@ -108,7 +105,6 @@ impl<'a> Apply<'a> {
108105 author,
109106 committer,
110107 message,
111- parents : None ,
112108 }
113109 }
114110
@@ -131,7 +127,6 @@ impl<'a> Apply<'a> {
131127 author,
132128 committer,
133129 message,
134- parents : None ,
135130 } )
136131 }
137132
@@ -141,7 +136,6 @@ impl<'a> Apply<'a> {
141136 author : Some ( author) ,
142137 committer : self . committer ,
143138 message : self . message ,
144- parents : self . parents ,
145139 }
146140 }
147141
@@ -151,7 +145,6 @@ impl<'a> Apply<'a> {
151145 author : self . author ,
152146 committer : Some ( committer) ,
153147 message : self . message ,
154- parents : self . parents ,
155148 }
156149 }
157150
@@ -161,7 +154,6 @@ impl<'a> Apply<'a> {
161154 author : self . author ,
162155 committer : self . committer ,
163156 message : Some ( message) ,
164- parents : self . parents ,
165157 }
166158 }
167159
@@ -171,17 +163,6 @@ impl<'a> Apply<'a> {
171163 author : self . author ,
172164 committer : self . committer ,
173165 message : self . message ,
174- parents : self . parents ,
175- }
176- }
177-
178- pub fn with_parents ( self , parents : Vec < git2:: Oid > ) -> Self {
179- Apply {
180- tree : self . tree ,
181- author : self . author ,
182- committer : self . committer ,
183- message : self . message ,
184- parents : Some ( parents) ,
185166 }
186167 }
187168
@@ -866,16 +847,7 @@ fn apply_to_commit2(
866847 }
867848 }
868849
869- let filtered_parent_ids = commit
870- . parents ( )
871- . map ( |x| transaction. get ( filter, x. id ( ) ) )
872- . collect :: < Option < Vec < _ > > > ( ) ;
873- let filtered_parent_ids = some_or ! ( filtered_parent_ids, { return Ok ( None ) } ) ;
874- apply (
875- transaction,
876- nf,
877- Apply :: from_commit ( commit) ?. with_parents ( filtered_parent_ids) ,
878- ) ?
850+ apply ( transaction, nf, Apply :: from_commit ( commit) ?) ?
879851 }
880852 Op :: Squash ( Some ( ids) ) => {
881853 if let Some ( sq) = ids. get ( & LazyRef :: Resolved ( commit. id ( ) ) ) {
@@ -1053,18 +1025,7 @@ fn apply_to_commit2(
10531025
10541026 return per_rev_filter ( transaction, commit, filter, commit_filter, parent_filters) ;
10551027 }
1056- _ => {
1057- let filtered_parent_ids = commit
1058- . parent_ids ( )
1059- . map ( |x| transaction. get ( filter, x) )
1060- . collect :: < Option < Vec < _ > > > ( ) ;
1061- let filtered_parent_ids = some_or ! ( filtered_parent_ids, { return Ok ( None ) } ) ;
1062- apply (
1063- transaction,
1064- filter,
1065- Apply :: from_commit ( commit) ?. with_parents ( filtered_parent_ids) ,
1066- ) ?
1067- }
1028+ _ => apply ( transaction, filter, Apply :: from_commit ( commit) ?) ?,
10681029 } ;
10691030
10701031 let tree_data = rewrite_data;
@@ -1538,11 +1499,7 @@ fn per_rev_filter(
15381499
15391500 let filtered_parent_ids: Vec < _ > = normal_parents. into_iter ( ) . chain ( extra_parents) . collect ( ) ;
15401501
1541- let mut tree_data = apply (
1542- transaction,
1543- commit_filter,
1544- Apply :: from_commit ( commit) ?. with_parents ( filtered_parent_ids. clone ( ) ) ,
1545- ) ?;
1502+ let mut tree_data = apply ( transaction, commit_filter, Apply :: from_commit ( commit) ?) ?;
15461503
15471504 if let Some ( ( pin_subtract, pin_overlay) ) = pin_details {
15481505 let with_exclude = tree:: subtract ( transaction, tree_data. tree ( ) . id ( ) , pin_subtract) ?;
0 commit comments