Commit Diff


commit - 455de7fa2c4ca7bb8c24c144e14c235f8d757503
commit + c5b7833452086e7e8e0866b16a5932430cfe9a79
blob - fd052abf8a8b6704d976ad97d0b120a4dc02ad51
blob + f7433438ed173bf228ef2be0f9ef54cc029464b3
--- tog/tog.c
+++ tog/tog.c
@@ -1879,11 +1879,6 @@ log_thread(void *arg)
 	struct tog_log_thread_args *a = arg;
 	int done = 0;
 
-	err = got_commit_graph_iter_start(a->graph, a->start_id, a->repo,
-	    NULL, NULL);
-	if (err)
-		return (void *)err;
-
 	while (!done && !err && !tog_sigpipe_received) {
 		err = queue_commits(a->graph, a->commits, 1, a->repo,
 		    a->in_repo_path, a->searching, a->search_next_done,
@@ -2160,6 +2155,10 @@ open_log_view(struct tog_view *view, struct got_object
 	err = got_commit_graph_open(&thread_graph, s->in_repo_path, 0);
 	if (err)
 		goto done;
+	err = got_commit_graph_iter_start(thread_graph,
+	     s->start_id, s->repo, NULL, NULL);
+	if (err)
+		goto done;
 
 	errcode = pthread_cond_init(&s->thread_args.need_commits, NULL);
 	if (errcode) {