From 4b0621cfb0c714b3935068b25cf4b441bfe7165b Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Wed, 27 Apr 2016 13:01:54 +0200 Subject: info: Use deploy_data --- app/xdg-app-builtins-info.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/xdg-app-builtins-info.c b/app/xdg-app-builtins-info.c index c44378b..954ef6d 100644 --- a/app/xdg-app-builtins-info.c +++ b/app/xdg-app-builtins-info.c @@ -61,10 +61,11 @@ xdg_app_builtin_info (int argc, char **argv, GCancellable *cancellable, GError * g_autoptr(XdgAppDir) system_dir = NULL; XdgAppDir *dir = NULL; g_autoptr(GError) lookup_error = NULL; + g_autoptr(GVariant) deploy_data = NULL; const char *name; const char *branch = "master"; - g_autofree char *commit = NULL; - g_autofree char *origin = NULL; + const char *commit = NULL; + const char *origin = NULL; gboolean is_app = FALSE; gboolean first = TRUE; @@ -120,11 +121,12 @@ xdg_app_builtin_info (int argc, char **argv, GCancellable *cancellable, GError * return FALSE; } - commit = xdg_app_dir_read_active (dir, ref, NULL); - if (commit == NULL) + deploy_data = xdg_app_dir_get_deploy_data (dir, ref, cancellable, error); + if (deploy_data == NULL) return FALSE; - origin = xdg_app_dir_get_origin (dir, ref, NULL, NULL); + commit = xdg_app_deploy_data_get_commit (deploy_data); + origin = xdg_app_deploy_data_get_origin (deploy_data); if (!opt_show_ref && !opt_show_origin && !opt_show_commit) opt_show_ref = opt_show_origin = opt_show_commit = TRUE; -- cgit v1.2.1