[ostree] main: Add --link-checkout-speedup option to commit



commit a3b6401788f8c353343deb68debb5444038c1ab6
Author: Colin Walters <walters verbum org>
Date:   Wed Jul 17 16:16:45 2013 -0400

    main: Add --link-checkout-speedup option to commit
    
    And disable devino scan by default.  For the gnome-ostree build case,
    our commits are from "make install DESTDIR=", so they won't be
    hardlinks into the repo.  In that case, particularly as the repository
    size grows, the cost of building up the devino -> checksum mapping
    becomes a problem.
    
    The compose step will use this option though.

 src/ostree/ot-builtin-commit.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c
index 58797cc..f4af1b4 100644
--- a/src/ostree/ot-builtin-commit.c
+++ b/src/ostree/ot-builtin-commit.c
@@ -34,6 +34,7 @@ static char *branch;
 static char **metadata_strings;
 static char *statoverride_file;
 static char *opt_related_objects_file;
+static gboolean opt_link_checkout_speedup;
 static gboolean skip_if_unchanged;
 static gboolean tar_autocreate_parents;
 static gboolean no_xattrs;
@@ -53,6 +54,7 @@ static GOptionEntry options[] = {
   { "owner-uid", 0, 0, G_OPTION_ARG_INT, &owner_uid, "Set file ownership user id", "UID" },
   { "owner-gid", 0, 0, G_OPTION_ARG_INT, &owner_gid, "Set file ownership group id", "GID" },
   { "no-xattrs", 0, 0, G_OPTION_ARG_NONE, &no_xattrs, "Do not import extended attributes", NULL },
+  { "link-checkout-speedup", 0, 0, G_OPTION_ARG_NONE, &opt_link_checkout_speedup, "Optimize for commits of 
trees composed of hardlinks into the repository", NULL },
   { "tar-autocreate-parents", 0, 0, G_OPTION_ARG_NONE, &tar_autocreate_parents, "When loading tar archives, 
automatically create parent directories as needed", NULL },
   { "skip-if-unchanged", 0, 0, G_OPTION_ARG_NONE, &skip_if_unchanged, "If the contents are unchanged from 
previous commit, do nothing", NULL },
   { "statoverride", 0, 0, G_OPTION_ARG_FILENAME, &statoverride_file, "File containing list of modifications 
to make to permissions", "path" },
@@ -346,7 +348,7 @@ ostree_builtin_commit (int argc, char **argv, GFile *repo_path, GCancellable *ca
         goto out;
     }
 
-  if (!ostree_repo_prepare_transaction (repo, TRUE, NULL, cancellable, error))
+  if (!ostree_repo_prepare_transaction (repo, opt_link_checkout_speedup, NULL, cancellable, error))
     goto out;
 
   in_transaction = TRUE;


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