File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ impl File {
118
118
}
119
119
120
120
pub fn verify_checksum ( & self ) -> Result < owned:: Id , ( owned:: Id , owned:: Id ) > {
121
- // TODO: Use/copy git_odb::hash::bytes_of_file.
121
+ // Even though we could use git_features::hash::bytes_of_file(…), this would require using our own
122
+ // Error type to support io::Error and Mismatch. As we only gain progress, there probably isn't much value
123
+ // as these files are usually small enough to process them in less than a second, even for the large ones.
124
+ // But it's possible, once a progress instance is passed.
122
125
let data_len_without_trailer = self . data . len ( ) - SHA1_SIZE ;
123
126
let mut hasher = git_features:: hash:: Sha1 :: default ( ) ;
124
127
hasher. update ( & self . data [ ..data_len_without_trailer] ) ;
You can’t perform that action at this time.
0 commit comments