The pair of `git_blob_create_frombuffer()` and `git_blob_create_frombuffer_commit()` is meant to replace `git_blob_create_fromchunks()` by providing a way for a user to write a new blob when they want filtering or they do not know the size. This approach allows the caller to retain control over when to add data to this buffer and a more natural fit into higher-level language's own stream abstractions instead of having to handle IO wait in the callback. The in-memory buffer size of 2MB is chosen somewhat arbitrarily to be a round multiple of usual page sizes and a value where most blobs seem likely to be either going to be way below or way over that size. It's also a round number of pages. This implementation re-uses the helper we have from `_fromchunks()` so we end up writing everything to disk, but hopefully more efficiently than with a default filebuf. A later optimisation can be to avoid writing the in-memory contents to disk, with some extra complexity.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| sys | Loading commit data... | |
| annotated_commit.h | Loading commit data... | |
| attr.h | Loading commit data... | |
| blame.h | Loading commit data... | |
| blob.h | Loading commit data... | |
| branch.h | Loading commit data... | |
| buffer.h | Loading commit data... | |
| checkout.h | Loading commit data... | |
| cherrypick.h | Loading commit data... | |
| clone.h | Loading commit data... | |
| commit.h | Loading commit data... | |
| common.h | Loading commit data... | |
| config.h | Loading commit data... | |
| cred_helpers.h | Loading commit data... | |
| describe.h | Loading commit data... | |
| diff.h | Loading commit data... | |
| errors.h | Loading commit data... | |
| filter.h | Loading commit data... | |
| global.h | Loading commit data... | |
| graph.h | Loading commit data... | |
| ignore.h | Loading commit data... | |
| index.h | Loading commit data... | |
| indexer.h | Loading commit data... | |
| inttypes.h | Loading commit data... | |
| merge.h | Loading commit data... | |
| message.h | Loading commit data... | |
| net.h | Loading commit data... | |
| notes.h | Loading commit data... | |
| object.h | Loading commit data... | |
| odb.h | Loading commit data... | |
| odb_backend.h | Loading commit data... | |
| oid.h | Loading commit data... | |
| oidarray.h | Loading commit data... | |
| pack.h | Loading commit data... | |
| patch.h | Loading commit data... | |
| pathspec.h | Loading commit data... | |
| rebase.h | Loading commit data... | |
| refdb.h | Loading commit data... | |
| reflog.h | Loading commit data... | |
| refs.h | Loading commit data... | |
| refspec.h | Loading commit data... | |
| remote.h | Loading commit data... | |
| repository.h | Loading commit data... | |
| reset.h | Loading commit data... | |
| revert.h | Loading commit data... | |
| revparse.h | Loading commit data... | |
| revwalk.h | Loading commit data... | |
| signature.h | Loading commit data... | |
| stash.h | Loading commit data... | |
| status.h | Loading commit data... | |
| stdint.h | Loading commit data... | |
| strarray.h | Loading commit data... | |
| submodule.h | Loading commit data... | |
| tag.h | Loading commit data... | |
| trace.h | Loading commit data... | |
| transaction.h | Loading commit data... | |
| transport.h | Loading commit data... | |
| tree.h | Loading commit data... | |
| types.h | Loading commit data... | |
| version.h | Loading commit data... |