Commit Diff


commit - 3ff3126d9bc18078f944e7e176dc076111aa436a
commit + 7e33c8c53ef5e4d67f3fe59f5f2331ef875e6d53
blob - d255fe9f66d8946a733914ff7f48c8e0440731d1
blob + ce6e873bbca21232e04564bbc51942ed40881e96
--- lib/commit_graph.c
+++ lib/commit_graph.c
@@ -480,18 +480,13 @@ got_commit_graph_iter_start(struct got_commit_graph *g
     got_cancel_cb cancel_cb, void *cancel_arg)
 {
 	const struct got_error *err = NULL;
-	struct got_commit_object *commit;
 
 	if (!TAILQ_EMPTY(&graph->iter_list))
 		return got_error(GOT_ERR_ITER_BUSY);
-
-	err = got_object_open_as_commit(&commit, repo, id);
-	if (err)
-		return err;
 
 	err = got_object_idset_add(graph->open_branches, id, NULL);
 	if (err)
-		goto done;
+		return err;
 
 	/* Locate first commit which changed graph->path. */
 	while (graph->iter_node == NULL &&
@@ -499,11 +494,10 @@ got_commit_graph_iter_start(struct got_commit_graph *g
 		err = fetch_commits_from_open_branches(graph, repo,
 		    cancel_cb, cancel_arg);
 		if (err)
-			break;
+			return err;
 	}
-done:
-	got_object_commit_close(commit);
-	return err;
+
+	return NULL;
 }
 
 const struct got_error *