@@ -106,8 +106,9 @@ pub fn file(
106
106
107
107
let ( mut buf, mut buf2) = ( Vec :: new ( ) , Vec :: new ( ) ) ;
108
108
let commit = find_commit ( cache. as_ref ( ) , & odb, & suspect, & mut buf) ?;
109
- let mut queue: gix_revwalk:: PriorityQueue < CommitTime , ObjectId > = gix_revwalk:: PriorityQueue :: new ( ) ;
110
- queue. insert ( commit_time ( commit) ?, suspect) ;
109
+ let mut queue: gix_revwalk:: PriorityQueue < gix_date:: SecondsSinceUnixEpoch , ObjectId > =
110
+ gix_revwalk:: PriorityQueue :: new ( ) ;
111
+ queue. insert ( commit. commit_time ( ) ?, suspect) ;
111
112
112
113
let mut out = Vec :: new ( ) ;
113
114
let mut diff_state = gix_diff:: tree:: State :: default ( ) ;
@@ -126,7 +127,7 @@ pub fn file(
126
127
}
127
128
128
129
let commit = find_commit ( cache. as_ref ( ) , & odb, & suspect, & mut buf) ?;
129
- let commit_time = commit_time ( commit ) ?;
130
+ let commit_time = commit . commit_time ( ) ?;
130
131
131
132
if let Some ( since) = options. since {
132
133
if commit_time < since. seconds {
@@ -651,17 +652,6 @@ fn find_path_entry_in_commit(
651
652
Ok ( res. map ( |e| e. oid ) )
652
653
}
653
654
654
- type CommitTime = i64 ;
655
-
656
- fn commit_time ( commit : gix_traverse:: commit:: Either < ' _ , ' _ > ) -> Result < CommitTime , gix_object:: decode:: Error > {
657
- match commit {
658
- gix_traverse:: commit:: Either :: CommitRefIter ( commit_ref_iter) => {
659
- commit_ref_iter. committer ( ) . map ( |c| c. seconds ( ) )
660
- }
661
- gix_traverse:: commit:: Either :: CachedCommit ( commit) => Ok ( commit. committer_timestamp ( ) as i64 ) ,
662
- }
663
- }
664
-
665
655
type ParentIds = SmallVec < [ ( gix_hash:: ObjectId , i64 ) ; 2 ] > ;
666
656
667
657
fn collect_parents (
0 commit comments