repo: Make the ordering consistent between abort/complete_transaction
This just makes the functions nicer to stare at. https://bugzilla.gnome.org/show_bug.cgi?id=707644
This commit is contained in:
parent
4dcf1a4282
commit
f5f7fe5e9a
|
|
@ -1264,14 +1264,14 @@ ostree_repo_commit_transaction_with_stats (OstreeRepo *self,
|
||||||
if (!cleanup_tmpdir (self, cancellable, error))
|
if (!cleanup_tmpdir (self, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (!ot_gfile_ensure_unlinked (self->transaction_lock_path, cancellable, error))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
if (self->loose_object_devino_hash)
|
if (self->loose_object_devino_hash)
|
||||||
g_hash_table_remove_all (self->loose_object_devino_hash);
|
g_hash_table_remove_all (self->loose_object_devino_hash);
|
||||||
|
|
||||||
self->in_transaction = FALSE;
|
self->in_transaction = FALSE;
|
||||||
|
|
||||||
|
if (!ot_gfile_ensure_unlinked (self->transaction_lock_path, cancellable, error))
|
||||||
|
goto out;
|
||||||
|
|
||||||
if (out_metadata_objects_total) *out_metadata_objects_total = self->txn_metadata_objects_total;
|
if (out_metadata_objects_total) *out_metadata_objects_total = self->txn_metadata_objects_total;
|
||||||
if (out_metadata_objects_written) *out_metadata_objects_written = self->txn_metadata_objects_written;
|
if (out_metadata_objects_written) *out_metadata_objects_written = self->txn_metadata_objects_written;
|
||||||
if (out_content_objects_total) *out_content_objects_total = self->txn_content_objects_total;
|
if (out_content_objects_total) *out_content_objects_total = self->txn_content_objects_total;
|
||||||
|
|
@ -1302,10 +1302,11 @@ ostree_repo_abort_transaction (OstreeRepo *self,
|
||||||
if (!cleanup_tmpdir (self, cancellable, error))
|
if (!cleanup_tmpdir (self, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
self->in_transaction = FALSE;
|
|
||||||
if (self->loose_object_devino_hash)
|
if (self->loose_object_devino_hash)
|
||||||
g_hash_table_remove_all (self->loose_object_devino_hash);
|
g_hash_table_remove_all (self->loose_object_devino_hash);
|
||||||
|
|
||||||
|
self->in_transaction = FALSE;
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
out:
|
out:
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue