config: add new parameter "commit-update-summary" to core section
When set to true, the summary file is automatically updated after a commit. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
1 parent
362771aa98
commit
9e6ac6d822
4 files changed
+75
No files matched your search
@@ -487,6 +487,7 @@ ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError
|
||||
|
||||
if (!skip_commit)
|
||||
{
|
||||
gboolean update_summary;
|
||||
if (!ostree_repo_write_commit (repo, parent, opt_subject, opt_body, metadata,
|
||||
OSTREE_REPO_FILE (root),
|
||||
&commit_checksum, cancellable, error))
|
||||
@@ -522,6 +523,17 @@ ostree_builtin_commit (int argc, char **argv, GCancellable *cancellable, GError
|
||||
|
||||
if (!ostree_repo_commit_transaction (repo, &stats, cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (!ot_keyfile_get_boolean_with_default (ostree_repo_get_config (repo), "core",
|
||||
"commit-update-summary", FALSE,
|
||||
&update_summary, error))
|
||||
goto out;
|
||||
|
||||
if (update_summary && !ostree_repo_regenerate_summary (repo,
|
||||
NULL,
|
||||
cancellable,
|
||||
error))
|
||||
goto out;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user