pull-local: Don't call g_hash_table_init() on a NULL hash
Not sure why this wasn't crashing before.
This commit is contained in:
parent
a821420711
commit
99fe7b66b3
|
|
@ -241,6 +241,8 @@ ostree_builtin_pull_local (int argc, char **argv, GFile *repo_path, GError **err
|
|||
|
||||
source_objects = ostree_traverse_new_reachable ();
|
||||
|
||||
if (refs_to_clone)
|
||||
{
|
||||
g_hash_table_iter_init (&hash_iter, refs_to_clone);
|
||||
while (g_hash_table_iter_next (&hash_iter, &key, &value))
|
||||
{
|
||||
|
|
@ -249,7 +251,10 @@ ostree_builtin_pull_local (int argc, char **argv, GFile *repo_path, GError **err
|
|||
if (!ostree_traverse_commit (data->src_repo, checksum, 0, source_objects, cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (commits_to_clone)
|
||||
{
|
||||
g_hash_table_iter_init (&hash_iter, commits_to_clone);
|
||||
while (g_hash_table_iter_next (&hash_iter, &key, &value))
|
||||
{
|
||||
|
|
@ -258,6 +263,7 @@ ostree_builtin_pull_local (int argc, char **argv, GFile *repo_path, GError **err
|
|||
if (!ostree_traverse_commit (data->src_repo, checksum, 0, source_objects, cancellable, error))
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ostree_repo_prepare_transaction (data->dest_repo, FALSE, cancellable, error))
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue