Commit Diff


commit - ce47a424491a18ce7fec45cd7b3ab08f568c90d6
commit + cb3528126b0c316de49661eb97920112c6e997c4
blob - 2c10f94ec0af1f680f3797b95bbf57ad19ef579d
blob + 99ba3e30c7a4a0632355ef9ce8d17fe2a4b407a0
--- lib/commit_graph.c
+++ lib/commit_graph.c
@@ -418,11 +418,8 @@ fetch_commits_from_open_branches(int *ncommits, int *w
 
 		err = add_node(&new_node, graph, commit_id, commit, child_node);
 		got_object_commit_close(commit);
-		if (err) {
-			if (err->code != GOT_ERR_OBJ_EXISTS)
-				break;
-			err = NULL;
-		}
+		if (err)
+			break;
 		if (new_node)
 			(*ncommits)++;
 		if (wanted_id && got_object_id_cmp(commit_id, wanted_id) == 0)