Skip to content

Commit a6e05db

Browse files
committed
modulem-validator: Remove synthetic "index" value from a --type option
1 parent 95b131f commit a6e05db

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modulemd/modulemd-validator.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,7 @@ set_type (const gchar *option_name,
139139
gpointer data,
140140
GError **error)
141141
{
142-
if (!g_strcmp0 (value, "index"))
143-
options.type = MMD_TYPE_INDEX;
144-
else if (!g_strcmp0 (value, "modulemd-v1"))
142+
if (!g_strcmp0 (value, "modulemd-v1"))
145143
options.type = MMD_TYPE_MODULEMD_V1;
146144
else if (!g_strcmp0 (value, "modulemd-v2"))
147145
options.type = MMD_TYPE_MODULEMD_V2;
@@ -187,7 +185,7 @@ mmd_type2astring (enum mmd_type type)
187185
// clang-format off
188186
static GOptionEntry entries[] = {
189187
{ "debug", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, set_verbosity, "Output debugging messages", NULL },
190-
{ "type", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_CALLBACK, set_type, "Document type (index, modulemd-v1, modulemd-v2, modulemd-defaults-v1, modulemd-obsoletes-v1, modulemd-packager-v2, modulemd-packager-v3, modulemd-translations-v1; default is index only which one accepts multi-document YAML files)", NULL },
188+
{ "type", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_CALLBACK, set_type, "Constrain a document type (modulemd-v1, modulemd-v2, modulemd-defaults-v1, modulemd-obsoletes-v1, modulemd-packager-v2, modulemd-packager-v3, modulemd-translations-v1); by default any document type loadable into a modulemd index is acceptable; this option only supports single-document files", "TYPE" },
191189
{ "quiet", 'q', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, set_verbosity, "Print no output", NULL },
192190
{ "verbose", 'v', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, set_verbosity, "Be verbose", NULL },
193191
{ "version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, print_version, "Print version number, then exit", NULL },

0 commit comments

Comments
 (0)