[ostree] Fix help output for nested subcommands



commit 9d72ff2d8e72deef9cf9322e76a0d192c653f2d4
Author: Owen W. Taylor <otaylor fishsoup net>
Date:   Tue Sep 23 15:33:13 2014 -0400

    Fix help output for nested subcommands
    
    Only 'ostree admin' was appearing in the help message for commands
    nested within ostree admin.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737194

 src/ostree/ot-admin-builtin-instutil.c |    2 ++
 src/ostree/ot-builtin-admin.c          |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/ostree/ot-admin-builtin-instutil.c b/src/ostree/ot-admin-builtin-instutil.c
index 9e57120..c87ffa4 100644
--- a/src/ostree/ot-admin-builtin-instutil.c
+++ b/src/ostree/ot-admin-builtin-instutil.c
@@ -151,6 +151,8 @@ ot_admin_builtin_instutil (int argc, char **argv, OstreeSysroot *sysroot, GCance
       goto out;
     }
 
+  g_set_prgname (g_strdup_printf ("ostree admin instutil %s", subcommand_name));
+
   if (!subcommand->fn (argc, argv, sysroot, cancellable, error))
     goto out;
  
diff --git a/src/ostree/ot-builtin-admin.c b/src/ostree/ot-builtin-admin.c
index 533f15f..ef54797 100644
--- a/src/ostree/ot-builtin-admin.c
+++ b/src/ostree/ot-builtin-admin.c
@@ -179,6 +179,8 @@ ostree_builtin_admin (int argc, char **argv, OstreeRepo *repo, GCancellable *can
       goto out;
     }
 
+  g_set_prgname (g_strdup_printf ("ostree admin %s", subcommand_name));
+
   sysroot_path = g_file_new_for_path (opt_sysroot);
   sysroot = ostree_sysroot_new (sysroot_path);
   if (!subcommand->fn (argc, argv, sysroot, cancellable, error))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]