diff options
author | Matthew Leeds <matthew.leeds@endlessm.com> | 2020-04-29 19:04:49 -0700 |
---|---|---|
committer | Matthew Leeds <matthew.leeds@endlessm.com> | 2020-04-29 19:04:49 -0700 |
commit | 8e69a9145091f37f8bd9d67b150eaaf5a6a65bf0 (patch) | |
tree | c5584e8e16f2054f908035ebdab5e306e477ad61 | |
parent | 1b8d5ecfe3801c2e99a63a7a12efbdf494c3d635 (diff) | |
download | flatpak-update-commit-option.tar.gz |
update: Restrict --commit to one app/runtimeupdate-commit-option
Currently if you run "flatpak update --commit=XYZ", we try to use that
commit for every installed thing, which doesn't make much sense. Make it
an error not to specify a ref with --commit.
-rw-r--r-- | app/flatpak-builtins-update.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c index 3da7a067..1080f2b0 100644 --- a/app/flatpak-builtins-update.c +++ b/app/flatpak-builtins-update.c @@ -115,6 +115,10 @@ flatpak_builtin_update (int argc, n_prefs = 1; } + /* It doesn't make sense to use the same commit for more than one thing */ + if (opt_commit && n_prefs != 1) + return usage_error (context, _("With --commit, only one REF may be specified"), error); + transactions = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); /* Walk through the array backwards so we can safely remove */ |