Skip to content

Commit

Permalink
repo: Minor cleanup: Move size generation code initialization
Browse files Browse the repository at this point in the history
It has a global effect, so do it in the entrypoint.
  • Loading branch information
cgwalters committed Dec 18, 2014
1 parent 880940f commit abb8833
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libostree/ostree-repo-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit abb8833

Please sign in to comment.