update: Make --commit=ID actually download that commit

Before it would fail if the commit wasn't accidentally locally.
This commit is contained in:
Alexander Larsson
2016-10-20 09:15:10 +02:00
parent 041d3eeb39
commit 9a45517536
2 changed files with 6 additions and 3 deletions

View File

@@ -213,8 +213,11 @@ flatpak_transaction_add_op (FlatpakTransaction *self,
else
opname = "update";
subpaths_str = subpaths_to_string (subpaths);
g_debug ("Transaction: %s %s:%s%s",
opname, remote, ref, subpaths_str);
g_debug ("Transaction: %s %s:%s%s%s%s",
opname, remote, ref,
commit != NULL ? "@" : "",
commit != NULL ? commit : "",
subpaths_str);
op = g_hash_table_lookup (self->refs, ref);
if (op != NULL)

View File

@@ -3489,7 +3489,7 @@ flatpak_dir_update (FlatpakDir *self,
if (!no_pull)
{
if (!flatpak_dir_pull (self, remote_name, ref, subpaths,
if (!flatpak_dir_pull (self, remote_name, checksum_or_latest != NULL ? checksum_or_latest : ref, subpaths,
NULL, OSTREE_REPO_PULL_FLAGS_NONE, progress,
cancellable, error))
return FALSE;