mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
0aef86d323
Summary: Change HgImporter::importFileContents() to return a Blob object rather than just the IOBuf. This shouldn't have any behavior changes. However, it might help track down some of the cases where we have seen files get incorrectly imported with empty contents in some rare cases. We're not sure what is causing that, but incorrectly using a moved-from IOBuf object would be one thing that might produce this behavior. By changing this code to a `unique_ptr<Blob>` will will eliminate the possibility of seeing empty buffer contents if some code path is somehow ever able to use one of these objects after they have been moved away from. (The code would end up with a null pointer in this case rather than an empty buffer. If this ever does occur in practice a null pointer would make the problem more obvious than an empty buffer.) Reviewed By: chadaustin Differential Revision: D9494651 fbshipit-source-id: 799cc1b1d0e2ac32ae2013dc80c84ec17cc1c491 |
||
---|---|---|
.. | ||
cli | ||
docs | ||
fs | ||
hooks | ||
integration | ||
py | ||
scripts | ||
test-data | ||
third-party | ||
win | ||
AUTODEPS | ||
Eden.project.toml |