lib/commit: Make -path commit helper API private
authorColin Walters <walters@verbum.org>
Mon, 9 Oct 2017 14:05:20 +0000 (10:05 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 11 Oct 2017 19:04:46 +0000 (19:04 +0000)
It's no longer called directly by the pull code, so make it static.

The goal here is to have the pull and local-fs commit paths use higher level
more efficient APIs, and eventually make those APIs public.

Closes: #1257
Approved by: jlebon

src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h

index ad9bc5af5a50a60f3251d1e8084b09b85a43b4f6..d045fd3fa374a09115f1bfddbbb2defc19404baf 100644 (file)
@@ -164,13 +164,13 @@ _ostree_repo_commit_tmpf_final (OstreeRepo        *self,
 /* Given a dfd+path combination (may be regular file or symlink),
  * rename it into place.
  */
-gboolean
-_ostree_repo_commit_path_final (OstreeRepo        *self,
-                                const char        *checksum,
-                                OstreeObjectType   objtype,
-                                OtCleanupUnlinkat *tmp_path,
-                                GCancellable      *cancellable,
-                                GError           **error)
+static gboolean
+commit_path_final (OstreeRepo        *self,
+                   const char        *checksum,
+                   OstreeObjectType   objtype,
+                   OtCleanupUnlinkat *tmp_path,
+                   GCancellable      *cancellable,
+                   GError           **error)
 {
   /* The final renameat() */
   char tmpbuf[_OSTREE_LOOSE_PATH_MAX];
@@ -746,9 +746,8 @@ write_content_object (OstreeRepo         *self,
           g_assert_not_reached ();
         }
 
-      if (!_ostree_repo_commit_path_final (self, actual_checksum, OSTREE_OBJECT_TYPE_FILE,
-                                           &tmp_unlinker,
-                                           cancellable, error))
+      if (!commit_path_final (self, actual_checksum, OSTREE_OBJECT_TYPE_FILE,
+                              &tmp_unlinker, cancellable, error))
         return FALSE;
     }
   else
index 7d50a5b73c07e6b35c265def18cddec94932a5e2..bbbb700e31e5cef121e34545a93fa49133cf02b7 100644 (file)
@@ -365,14 +365,6 @@ _ostree_repo_commit_tmpf_final (OstreeRepo        *self,
                                 GCancellable      *cancellable,
                                 GError           **error);
 
-gboolean
-_ostree_repo_commit_path_final (OstreeRepo        *self,
-                                const char        *checksum,
-                                OstreeObjectType   objtype,
-                                OtCleanupUnlinkat *tmp_path,
-                                GCancellable      *cancellable,
-                                GError           **error);
-
 gboolean
 _ostree_repo_open_content_bare (OstreeRepo          *self,
                                 const char          *checksum,