File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,16 @@ fn apply_to_commit2(
286286 Op :: Squash => {
287287 return Some ( history:: rewrite_commit ( repo, commit, & [ ] , & commit. tree ( ) ?) ) . transpose ( )
288288 }
289+ _ => {
290+ if let Some ( oid) = transaction. get ( filter, commit. id ( ) ) {
291+ return Ok ( Some ( oid) ) ;
292+ }
293+ }
294+ } ;
295+
296+ rs_tracing:: trace_scoped!( "apply_to_commit" , "spec" : spec( filter) , "commit" : commit. id( ) . to_string( ) ) ;
297+
298+ let filtered_tree = match & to_op ( filter) {
289299 Op :: Linear => {
290300 let p: Vec < _ > = commit. parents ( ) . collect ( ) ;
291301 if p. len ( ) == 0 {
@@ -304,16 +314,6 @@ fn apply_to_commit2(
304314 ) )
305315 . transpose ( ) ;
306316 }
307- _ => {
308- if let Some ( oid) = transaction. get ( filter, commit. id ( ) ) {
309- return Ok ( Some ( oid) ) ;
310- }
311- }
312- } ;
313-
314- rs_tracing:: trace_scoped!( "apply_to_commit" , "spec" : spec( filter) , "commit" : commit. id( ) . to_string( ) ) ;
315-
316- let filtered_tree = match & to_op ( filter) {
317317 Op :: Compose ( filters) => {
318318 let filtered = filters
319319 . iter ( )
You can’t perform that action at this time.
0 commit comments