]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- coding style 1097/head
authorArvin Schnell <aschnell@suse.de>
Wed, 28 Jan 2026 13:27:06 +0000 (14:27 +0100)
committerArvin Schnell <aschnell@suse.de>
Wed, 28 Jan 2026 13:27:06 +0000 (14:27 +0100)
client/snbk/cmd-restore.cc
client/snbk/cmd-visualize.cc

index ffb97e527c28a1766bc6eb15b7a61833418b99be..085e79ad1b9491ad0b2cf6abdcdda530d2867cfb 100644 (file)
@@ -96,8 +96,7 @@ namespace snapper
             << "\t" << _("snbk restore [numbers]") << '\n'
             << '\n'
             << "\t" << _("Notice:") << '\n'
-            << "\t" << _("- A backup-config must be specified to run this command.")
-                    << '\n'
+            << "\t" << _("- A backup-config must be specified to run this command.") << '\n'
             << "\t" << _("- Restart the `snapperd` service to make the restored "
                          "snapshots visible immediately.") << '\n'
             << '\n';
index 16f2ba3f60b6da8cbdf151954658ce367ff022c9..3981534e2f7434a5fc34e99c511281af6edb0685 100644 (file)
@@ -57,28 +57,26 @@ namespace snapper
     });
 
 
-    void help_visualize()
+    void
+    help_visualize()
     {
        cout << "  " << _("Produce a specific graph in Graphviz DOT format:") << '\n'
             << "\t" << _("snbk visualize <mode>") << '\n'
             << "\n"
             << "\t" << _("Supported modes:") << '\n'
-            << "\t"
-            << _("- source-tree: Produce a tree diagram of the snapshots on the source.")
+            << "\t" << _("- source-tree: Produce a tree diagram of the snapshots on the source.") << '\n'
+            << "\t" << _("- target-tree: Produce a tree diagram of the snapshots on the target.") << '\n'
             << '\n'
-            << "\t"
-            << _("- target-tree: Produce a tree diagram of the snapshots on the target.")
-            << '\n'
-            << '\n'
-            << _("    Options for the 'visualize' command:") << '\n';
+            << "    " << _("Options for the 'visualize' command:") << '\n';
 
        print_options({
-           { _("--rankdir, -r"),
-             _("The 'rankdir' diagram attribute of Graphviz. Defaults to 'LR'.") },
+           { _("--rankdir, -r"), _("The 'rankdir' diagram attribute of Graphviz. Defaults to 'LR'.") },
        });
     }
 
-    void command_visualize(const GlobalOptions& global_options, GetOpts& get_opts,
+
+    void
+    command_visualize(const GlobalOptions& global_options, GetOpts& get_opts,
                            const BackupConfigs& backup_configs, ProxySnappers* snappers)
     {
        // Drawing a graph for multiple backup configs is not supported.
@@ -88,10 +86,11 @@ namespace snapper
                                        "command.")));
        }
 
-       const BackupConfig& backup_config = backup_configs.front();
-
        // Check and parse arguments
-       const vector<Option> options = { Option("rankdir", required_argument, 'r') };
+       const vector<Option> options = {
+           Option("rankdir",   required_argument,      'r')
+       };
+
        ParsedOpts opts = get_opts.parse("visualize", options);
        if (get_opts.num_args() != 1)
        {
@@ -120,7 +119,9 @@ namespace snapper
        }
 
        // Execute command
+       const BackupConfig& backup_config = backup_configs.front();
        TheBigThings the_big_things(backup_config, snappers, false);
+
        switch (mode)
        {
            case Mode::SOURCE_TREE: