Skip to content

Commit

Permalink
Revert "move --simulate to global options"
Browse files Browse the repository at this point in the history
This reverts commit 358f703.

The short option -s conflicts info --size and fetch --stdout.
Revert this for now.
  • Loading branch information
fabled committed Nov 15, 2018
1 parent 0565e9b commit bd8967b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/apk.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static int option_parse_global(void *ctx, struct apk_db_options *dbopts, int opt
case 0x101:
apk_flags |= APK_PROGRESS;
break;
case 's':
case 0x104:
apk_flags |= APK_SIMULATE;
break;
case 0x110:
Expand Down Expand Up @@ -192,7 +192,6 @@ static const struct apk_option options_global[] = {
{ 'i', "interactive", "Ask confirmation for certain operations" },
{ 'V', "version", "Print program version and exit" },
{ 'f', "force", "Enable selected --force-* (deprecated)" },
{ 's', "simulate", "Show what would be done without actually doing it" },
{ 0x125, "force-binary-stdout", "Continue even if binary data is to be output" },
{ 0x122, "force-broken-world", "Continue even if 'world' cannot be satisfied" },
{ 0x124, "force-non-repository", "Continue even if packages may be lost on reboot" },
Expand Down Expand Up @@ -239,6 +238,9 @@ const struct apk_option_group optgroup_global = {
static int option_parse_commit(void *ctx, struct apk_db_options *dbopts, int optch, const char *optarg)
{
switch (optch) {
case 's':
apk_flags |= APK_SIMULATE;
break;
case 0x102:
apk_flags |= APK_CLEAN_PROTECTED;
break;
Expand All @@ -264,6 +266,7 @@ static int option_parse_commit(void *ctx, struct apk_db_options *dbopts, int opt
}

static const struct apk_option options_commit[] = {
{ 's', "simulate", "Show what would be done without actually doing it" },
{ 0x102, "clean-protected", "Do not create .apk-new files in configuration dirs" },
{ 0x111, "overlay-from-stdin", "Read list of overlay files from stdin" },
{ 0x113, "no-scripts", "Do not execute any scripts" },
Expand Down

0 comments on commit bd8967b

Please sign in to comment.