HomeClusterLabs Projects

Refactor: tools: Overhaul input option storage in crm_diff.c
197d4cb1c1c9Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Refactor: tools: Overhaul input option storage in crm_diff.c

It's simpler to use multiple strings than to have a boolean represent
whether a file name should be treated as a raw string.

When we can make the input precedence sane at a compatibility break, an
enum for input source will likely make the most sense. Then we can bring
back callbacks to set the enum value.

Also rename "apply" to "patch" for clarity, and use G_OPTION_FLAG_NONE.

It's okay to continue passing options.source_file to generate_patch().
In the past, if it were a raw XML string, we would pass that as the
argument. That's not a pretty prefix for logging XML.

Use G_OPTION_ARG_NONE where appropriate.

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 17 2025, 5:52 PM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.