Move ref writing to be transaction-based

Rather than having separate write_ref calls, make clients start a
transaction, add some refs, and then commit it. While this doesn't
make it 100% atomic, it makes it easier for us to use an atomic
model, and it means we don't do as much I/O updating the summary
file and such.

https://bugzilla.gnome.org/show_bug.cgi?id=707644
This commit is contained in:
Jasper St. Pierre committed 2013-09-06 20:31:12 -04:00
1 parent bd2948e964
commit 91d3b90c9f
13 files changed
+189 -101

No files matched your search

+2 -2
View File
@@ -68,6 +68,8 @@ ostree_repo_scan_hardlinks
ostree_repo_prepare_transaction
ostree_repo_commit_transaction
ostree_repo_abort_transaction
ostree_repo_transaction_set_ref
ostree_repo_transaction_set_refspec
ostree_repo_has_object
ostree_repo_write_metadata
ostree_repo_write_metadata_async
@@ -78,8 +80,6 @@ ostree_repo_write_content_trusted
ostree_repo_write_content_async
ostree_repo_write_content_finish
ostree_repo_resolve_rev
ostree_repo_write_ref
ostree_repo_write_refspec
ostree_repo_list_refs
ostree_repo_load_variant
ostree_repo_load_variant_if_exists