Page MenuHomePhabricator

lfs: explicitly close the file handle for the blob being uploaded
ClosedPublic

Authored by mharbison72 on Jan 21 2020, 1:37 PM.

Details

Summary

The previous code relied on reading the blob fully to close it. The obvious
problem is if an error occurs before that point. But there is also a problem
when using workers where the data may need to be re-read, which can't happen
once it is closed. This eliminates the surprising behavior before attempting to
fix the worker problem.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.