mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-21 15:15:34 -04:00
info: Minor cleanup
This commit is contained in:
1 parent
11bd2ff8e1
commit
90bcc44e10
1 file changed
+13
-12
+13
-12
@@ -53,6 +53,16 @@ static GOptionEntry options[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
/* Print space unless this is the first item */
|
||||
static void
|
||||
maybe_print_space (gboolean *first)
|
||||
{
|
||||
if (*first)
|
||||
*first = FALSE;
|
||||
else
|
||||
g_print (" ");
|
||||
}
|
||||
|
||||
gboolean
|
||||
flatpak_builtin_info (int argc, char **argv, GCancellable *cancellable, GError **error)
|
||||
{
|
||||
@@ -141,30 +151,21 @@ flatpak_builtin_info (int argc, char **argv, GCancellable *cancellable, GError *
|
||||
|
||||
if (opt_show_ref)
|
||||
{
|
||||
if (first)
|
||||
first = FALSE;
|
||||
else
|
||||
g_print (" ");
|
||||
maybe_print_space (&first);
|
||||
|
||||
g_print ("%s", ref);
|
||||
}
|
||||
|
||||
if (opt_show_origin)
|
||||
{
|
||||
if (first)
|
||||
first = FALSE;
|
||||
else
|
||||
g_print (" ");
|
||||
maybe_print_space (&first);
|
||||
|
||||
g_print ("%s", origin ? origin : "-");
|
||||
}
|
||||
|
||||
if (opt_show_commit)
|
||||
{
|
||||
if (first)
|
||||
first = FALSE;
|
||||
else
|
||||
g_print (" ");
|
||||
maybe_print_space (&first);
|
||||
|
||||
g_print ("%s", commit);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user