aboutsummaryrefslogtreecommitdiffstats
path: root/odb.h
diff options
context:
space:
mode:
Diffstat (limited to 'odb.h')
-rw-r--r--odb.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/odb.h b/odb.h
index a89b214390..82093753c8 100644
--- a/odb.h
+++ b/odb.h
@@ -186,6 +186,19 @@ struct object_database *odb_new(struct repository *repo);
void odb_clear(struct object_database *o);
/*
+ * Starts an ODB transaction. Subsequent objects are written to the transaction
+ * and not committed until odb_transaction_commit() is invoked on the
+ * transaction. If the ODB already has a pending transaction, NULL is returned.
+ */
+struct odb_transaction *odb_transaction_begin(struct object_database *odb);
+
+/*
+ * Commits an ODB transaction making the written objects visible. If the
+ * specified transaction is NULL, the function is a no-op.
+ */
+void odb_transaction_commit(struct odb_transaction *transaction);
+
+/*
* Find source by its object directory path. Dies in case the source couldn't
* be found.
*/