[ostree] repo: Delete leftover repo/pending dir



commit d863ef5838ddf369e59127ee5ca5e23b6ce316ad
Author: Colin Walters <walters verbum org>
Date:   Sun Sep 8 15:04:35 2013 -0400

    repo: Delete leftover repo/pending dir
    
    This is a relic from long ago when we were trying to stage objects
    before finally committing them all in one go in the pull code.
    
    We're no longer doing that, so stop trying to make the directory.
    This also fixes trying to use ostree as non-root to read the
    root-owned repo, since we'd fail to create the pending dir.

 src/libostree/ostree-repo-private.h |    1 -
 src/libostree/ostree-repo.c         |    5 -----
 2 files changed, 0 insertions(+), 6 deletions(-)
---
diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h
index 77336e5..f1ebced 100644
--- a/src/libostree/ostree-repo-private.h
+++ b/src/libostree/ostree-repo-private.h
@@ -30,7 +30,6 @@ struct OstreeRepo {
   GFile *repodir;
   GFile *tmp_dir;
   int    tmp_dir_fd;
-  GFile *pending_dir;
   GFile *local_heads_dir;
   GFile *remote_heads_dir;
   GFile *objects_dir;
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 02c518c..b43f3e0 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -85,7 +85,6 @@ ostree_repo_finalize (GObject *object)
   g_clear_object (&self->tmp_dir);
   if (self->tmp_dir_fd)
     (void) close (self->tmp_dir_fd);
-  g_clear_object (&self->pending_dir);
   g_clear_object (&self->local_heads_dir);
   g_clear_object (&self->remote_heads_dir);
   g_clear_object (&self->objects_dir);
@@ -161,7 +160,6 @@ ostree_repo_constructed (GObject *object)
   g_assert (self->repodir != NULL);
 
   self->tmp_dir = g_file_resolve_relative_path (self->repodir, "tmp");
-  self->pending_dir = g_file_resolve_relative_path (self->repodir, "tmp/pending");
   self->local_heads_dir = g_file_resolve_relative_path (self->repodir, "refs/heads");
   self->remote_heads_dir = g_file_resolve_relative_path (self->repodir, "refs/remotes");
 
@@ -464,9 +462,6 @@ ostree_repo_open (OstreeRepo    *self,
       goto out;
     }
 
-  if (!gs_file_ensure_directory (self->pending_dir, FALSE, cancellable, error))
-    goto out;
-
   self->config = g_key_file_new ();
   if (!g_key_file_load_from_file (self->config, gs_file_get_path_cached (self->config_file), 0, error))
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]