The idea is taken from Junio's work in read-cache.c, where it's used for writing out the index without tap-dancing on the poor harddrive. Since it's almost certainly useful for cached writing of packfiles too, we turn it into a generic API, making it perfectly simple to reuse it later. gitfo_write_cached() has the same contract as gitfo_write(), it returns GIT_SUCCESS if all bytes are successfully written (or were at least buffered for later writing), and <0 if an error occurs during buffer writing. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
git | Loading commit data... | |
cc-compat.h | Loading commit data... | |
commit.c | Loading commit data... | |
commit.h | Loading commit data... | |
common.h | Loading commit data... | |
errors.c | Loading commit data... | |
errors.h | Loading commit data... | |
fileops.c | Loading commit data... | |
fileops.h | Loading commit data... | |
odb.c | Loading commit data... | |
oid.c | Loading commit data... | |
revwalk.c | Loading commit data... | |
revwalk.h | Loading commit data... | |
thread-utils.c | Loading commit data... | |
thread-utils.h | Loading commit data... | |
util.h | Loading commit data... |