| 159 | } |
| 160 | |
| 161 | ObjectType parseObjectType(Source & source, const ExperimentalFeatureSettings & xpSettings) |
| 162 | { |
| 163 | xpSettings.require(Xp::GitHashing); |
| 164 | |
| 165 | auto type = getString(source, 5); |
| 166 | |
| 167 | if (type == "blob ") { |
| 168 | return ObjectType::Blob; |
| 169 | } else if (type == "tree ") { |
| 170 | return ObjectType::Tree; |
| 171 | } else |
| 172 | throw Error("input doesn't look like a Git object"); |
| 173 | } |
| 174 | |
| 175 | void parse( |
| 176 | FileSystemObjectSink & sink, |