@@ -44,11 +44,12 @@ pub(crate) mod function {
44
44
others : & [ ObjectId ] ,
45
45
graph : & mut Graph < ' _ , ' _ , Flags > ,
46
46
) -> Result < Option < Vec < ObjectId > > , Error > {
47
- let _span = gix_trace:: coarse!( "gix_revision::merge_base()" , ?first, ?others, ) ;
47
+ let _span = gix_trace:: coarse!( "gix_revision::merge_base()" , ?first, ?others) ;
48
48
if others. is_empty ( ) || others. contains ( & first) {
49
49
return Ok ( Some ( vec ! [ first] ) ) ;
50
50
}
51
51
52
+ graph. clear ( ) ;
52
53
let bases = paint_down_to_common ( first, others, graph) ?;
53
54
graph. clear ( ) ;
54
55
@@ -62,6 +63,7 @@ pub(crate) mod function {
62
63
commits : & [ ( ObjectId , GenThenTime ) ] ,
63
64
graph : & mut Graph < ' _ , ' _ , Flags > ,
64
65
) -> Result < Vec < ObjectId > , Error > {
66
+ let _span = gix_trace:: detail!( "gix_revision::remove_redundant()" , num_commits = %commits. len( ) ) ;
65
67
if commits. is_empty ( ) {
66
68
return Ok ( Vec :: new ( ) ) ;
67
69
}
@@ -217,11 +219,10 @@ pub(crate) mod function {
217
219
type Error = gix_object:: decode:: Error ;
218
220
219
221
fn try_from ( commit : LazyCommit < ' _ , ' _ > ) -> Result < Self , Self :: Error > {
222
+ let ( generation, timestamp) = commit. generation_and_timestamp ( ) ?;
220
223
Ok ( GenThenTime {
221
- generation : commit
222
- . generation ( )
223
- . unwrap_or ( gix_commitgraph:: GENERATION_NUMBER_INFINITY ) ,
224
- time : commit. committer_timestamp ( ) ?,
224
+ generation : generation. unwrap_or ( gix_commitgraph:: GENERATION_NUMBER_INFINITY ) ,
225
+ time : timestamp,
225
226
} )
226
227
}
227
228
}
0 commit comments