unsigned char obuf[16384];
unsigned hdrlen;
int status = Z_OK;
- int write_object = (flags & INDEX_WRITE_OBJECT);
- off_t offset = 0;
+ struct repo_config_values *cfg = repo_config_values(the_repository);
+ size_t bytes_read = 0;
- git_deflate_init(&s, pack_compression_level);
+ git_deflate_init(&s, cfg->pack_compression_level);
hdrlen = encode_in_pack_object_header(obuf, sizeof(obuf), OBJ_BLOB, size);
s.next_out = obuf + hdrlen;
*/
char *compute_alternate_path(const char *path, struct strbuf *err);
- /*
- * A transaction may be started for an object database prior to writing new
- * objects via odb_transaction_begin(). These objects are not committed until
- * odb_transaction_commit() is invoked. Only a single transaction may be pending
- * at a time.
- *
- * Each ODB source is expected to implement its own transaction handling.
- */
- struct odb_transaction;
- typedef void (*odb_transaction_commit_fn)(struct odb_transaction *transaction);
- struct odb_transaction {
- /* The ODB source the transaction is opened against. */
- struct odb_source *source;
-
- /* The ODB source specific callback invoked to commit a transaction. */
- odb_transaction_commit_fn commit;
- };
-struct packed_git;
-struct packfile_store;
-struct cached_object_entry;
--
/*
* The object database encapsulates access to objects in a repository. It
* manages one or more sources that store the actual objects which are