Width in bytes of one object id in this format.
(self)
| 42 | impl GitObjectFormat { |
| 43 | /// Width in bytes of one object id in this format. |
| 44 | pub fn oid_size(self) -> usize { |
| 45 | match self { |
| 46 | GitObjectFormat::Sha1 => 20, |
| 47 | GitObjectFormat::Sha256 => 32, |
| 48 | } |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | /// A Git object identity tagged with its repository's object format (RFC 5.1). |