summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-diff.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-10-09 12:05:56 -0400
committerColin Walters <walters@verbum.org>2013-10-09 12:05:56 -0400
commit270812419004ab5a9fffa4598c4accf13aec7234 (patch)
tree629ac924e1da53e2aea1a70e29e43025078c8339 /src/ostree/ot-builtin-diff.c
parentaf1c9b8721987e0de64a3dfdf2a240ed312f7c6a (diff)
downloadostree-270812419004ab5a9fffa4598c4accf13aec7234.tar.gz
repo: Tweak traversal API
It's convenient for bindings if we have a version that doesn't mutate the hash table, because they pass temporary hash tables as input.
Diffstat (limited to 'src/ostree/ot-builtin-diff.c')
-rw-r--r--src/ostree/ot-builtin-diff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ostree/ot-builtin-diff.c b/src/ostree/ot-builtin-diff.c
index 9680c3b8..9c26e703 100644
--- a/src/ostree/ot-builtin-diff.c
+++ b/src/ostree/ot-builtin-diff.c
@@ -178,8 +178,8 @@ ostree_builtin_diff (int argc, char **argv, OstreeRepo *repo, GCancellable *canc
if (opt_stats)
{
- gs_unref_hashtable GHashTable *reachable_a = ostree_repo_traverse_new_reachable ();
- gs_unref_hashtable GHashTable *reachable_b = ostree_repo_traverse_new_reachable ();
+ gs_unref_hashtable GHashTable *reachable_a = NULL;
+ gs_unref_hashtable GHashTable *reachable_b = NULL;
gs_unref_hashtable GHashTable *reachable_intersection = NULL;
gs_free char *rev_a = NULL;
gs_free char *rev_b = NULL;
@@ -193,9 +193,9 @@ ostree_builtin_diff (int argc, char **argv, OstreeRepo *repo, GCancellable *canc
if (!ostree_repo_resolve_rev (repo, target, FALSE, &rev_b, error))
goto out;
- if (!ostree_repo_traverse_commit (repo, rev_a, -1, reachable_a, cancellable, error))
+ if (!ostree_repo_traverse_commit (repo, rev_a, -1, &reachable_a, cancellable, error))
goto out;
- if (!ostree_repo_traverse_commit (repo, rev_b, -1, reachable_b, cancellable, error))
+ if (!ostree_repo_traverse_commit (repo, rev_b, -1, &reachable_b, cancellable, error))
goto out;
a_size = g_hash_table_size (reachable_a);