diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2015-11-05 13:28:37 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2015-11-16 10:57:33 +0100 |
commit | 0aa836c20557f6360b3f82eb0d523916da9e8f63 (patch) | |
tree | 2df27a91ee112a4b213eb5a61ccaeafb870605a0 /src/ostree/ot-main.c | |
parent | a19a112d9dda6d9bbcbfc4c8108063eded6bc38a (diff) | |
download | ostree-0aa836c20557f6360b3f82eb0d523916da9e8f63.tar.gz |
prune: add --delete-commit
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'src/ostree/ot-main.c')
-rw-r--r-- | src/ostree/ot-main.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ostree/ot-main.c b/src/ostree/ot-main.c index d3a7fd45..44e1bd49 100644 --- a/src/ostree/ot-main.c +++ b/src/ostree/ot-main.c @@ -419,3 +419,24 @@ ostree_print_gpg_verify_result (OstreeGpgVerifyResult *result) g_print ("%s", buffer->str); g_string_free (buffer, TRUE); } + +gboolean +ot_enable_tombstone_commits (OstreeRepo *repo, GError **error) +{ + gboolean ret = FALSE; + gboolean tombstone_commits = FALSE; + GKeyFile *config = ostree_repo_get_config (repo); + + tombstone_commits = g_key_file_get_boolean (config, "core", "tombstone-commits", NULL); + /* tombstone_commits is FALSE either if it is not found or it is really set to FALSE in the config file. */ + if (!tombstone_commits) + { + g_key_file_set_boolean (config, "core", "tombstone-commits", TRUE); + if (!ostree_repo_write_config (repo, config, error)) + goto out; + } + + ret = TRUE; + out: + return ret; +} |