Showing the changes to git-commitgraph/src (1 of 1 file). Show all
Unified · Split
| @@ -118,7 +118,10 @@ impl File { · 117 unmodified lines | ||
| 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]); |