Merge branch 'sg/index-format-doc-update' into maint
[git/debian.git] / bulk-checkin.h
blob8281b9cb159691530eb2f74b46daf535261f6c93
1 /*
2 * Copyright (c) 2011, Google Inc.
3 */
4 #ifndef BULK_CHECKIN_H
5 #define BULK_CHECKIN_H
7 #include "cache.h"
9 void prepare_loose_object_bulk_checkin(void);
10 void fsync_loose_object_bulk_checkin(int fd, const char *filename);
12 int index_bulk_checkin(struct object_id *oid,
13 int fd, size_t size, enum object_type type,
14 const char *path, unsigned flags);
17 * Tell the object database to optimize for adding
18 * multiple objects. end_odb_transaction must be called
19 * to make new objects visible. Transactions can be nested,
20 * and objects are only visible after the outermost transaction
21 * is complete or the transaction is flushed.
23 void begin_odb_transaction(void);
26 * Make any objects that are currently part of a pending object
27 * database transaction visible. It is valid to call this function
28 * even if no transaction is active.
30 void flush_odb_transaction(void);
33 * Tell the object database to make any objects from the
34 * current transaction visible if this is the final nested
35 * transaction.
37 void end_odb_transaction(void);
39 #endif