summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2014-12-15 22:55:56 -0500
committerColin Walters <walters@verbum.org>2014-12-18 18:06:56 -0500
commitabb88336b316a015024ec42cbdebdad772540ca8 (patch)
treebcaeb7ab2f44be2d28dd3c459d1f648cedabc866
parent880940f93bdb35117f0d6399f09f50344f38e021 (diff)
downloadostree-abb88336b316a015024ec42cbdebdad772540ca8.tar.gz
repo: Minor cleanup: Move size generation code initialization
It has a global effect, so do it in the entrypoint.
-rw-r--r--src/libostree/ostree-repo-commit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index 9d970e4a..6161f2b5 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -2109,11 +2109,6 @@ write_directory_to_mtree_internal (OstreeRepo *self,
g_debug ("Examining: %s", gs_file_get_path_cached (dir));
- if (modifier && modifier->flags & OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES)
- {
- self->generate_sizes = TRUE;
- }
-
/* If the directory is already in the repository, we can try to
* reuse checksums to skip checksumming. */
if (OSTREE_IS_REPO_FILE (dir) && modifier == NULL)
@@ -2233,6 +2228,11 @@ ostree_repo_write_directory_to_mtree (OstreeRepo *self,
gboolean ret = FALSE;
GPtrArray *path = NULL;
+ if (modifier && modifier->flags & OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES)
+ {
+ self->generate_sizes = TRUE;
+ }
+
path = g_ptr_array_new ();
if (!write_directory_to_mtree_internal (self, dir, mtree, modifier, path,
cancellable, error))