mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
5b65743a38
Summary: Update deserializeGitTree() to accept an IOBuf object. IOBuf objects can easily wrap other buffers, so this can still easily support ByteRange objects as well. Being able to use IOBuf's Cursor class ended up simplifying the logic a bit as well. Note that using IOBuf does require copying the name and mode data out of the buffer when we read it (using the readTerminatedString() API). This is necessary since the data may not be stored contiguously in the IOBuf. However, this shouldn't impact performance much: we already need to copy the name data into a std::string anyway. For the mode, most modern platforms can avoid doing a heap allocation for this small string. Reviewed By: bolinfest Differential Revision: D3357255 fbshipit-source-id: 5b6e1bc93199849327409a8039266d7dc4f3afdf |
||
---|---|---|
.. | ||
cli | ||
config | ||
importer/git | ||
inodes | ||
integration | ||
model | ||
overlay | ||
rocksdb | ||
service | ||
store |