sapling/eden/fs
Adam Simpkins 5b65743a38 update deserializeGitTree() to work with IOBuf
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
2016-06-08 00:15:22 -07:00
..
cli Create dot eden folder if it does not already exist when running eden daemon. 2016-06-07 13:03:13 -07:00
config Modify EdenServiceHandler to get client info through ClientConfig. 2016-05-13 15:10:22 -07:00
importer/git Include build files that were inadvertently excluded from the initial export. 2016-05-12 16:08:34 -07:00
inodes Introduce TreeEntryFileInode::getSHA1() 2016-05-27 18:17:07 -07:00
integration Create dot eden folder if it does not already exist when running eden daemon. 2016-06-07 13:03:13 -07:00
model update deserializeGitTree() to work with IOBuf 2016-06-08 00:15:22 -07:00
overlay changes to path iterator behavior 2016-06-02 22:08:15 -07:00
rocksdb Include build files that were inadvertently excluded from the initial export. 2016-05-12 16:08:34 -07:00
service changes to path iterator behavior 2016-06-02 22:08:15 -07:00
store display rocksdb key in hex if LocalStore::get() fails 2016-05-24 22:14:14 -07:00